-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ResteasyReactiveRequestContext getHttpHeaders and headers set by forwarded handling #46617
Comments
Can you please provide a sample application that shows what you are describing in action? |
/cc @FroMage (rest) |
It's probably sufficient to just highlight the problematic code. getHttpHeaders creates/caches headers separate from the serverRequest Line 234 in db7df2e
A later manipulation of the headers, such as Line 179 in db7df2e
will not show up in what is returned by an already cached ResteasyReactiveRequestContext.getHttpHeaders |
Look like Forwarded Vert.x handler is running after the REST request chain, the priority should be reversed, but I'm not sure where the fix should be done, also CC @cescoffier |
I will have a look next week when I'm back |
Describe the bug
When ResteasyReactiveRequestContext.getHttpHeaders is called will affect what headers are shown.
Expected behavior
Always get the headers after the host and possibly the trusted proxy header have been manipulated by the forwarded parser.
Actual behavior
A call to getHttpHeaders prior to some other call that will trigger the forwarded parser calculate method will cause the values of the headers pre forwarded parser handling to always be returned.
How to Reproduce?
Enable forwarded header processing.
Call getHttpHeaders before any logic that would trigger an underlying caculate.
Observer that the headers are unmodified.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
cc @cescoffier - relates to the usability of 5069761
The text was updated successfully, but these errors were encountered: