You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When modifying or create a new header in a @ServerRequestFilter annotated method (with or without preMatching = true) does not have an effect on method paramteres injected with @RestHeader or @HeaderParam.
you will get the original header for the user agent field, no matter what you set to the headers via ContainerRequestContext.getHeaders().putSingle() in the @ServerRequestFilter annotated method.
However, the modified headers are available in the HttpHeaders object you can inject into the method.
Expected behavior
The injected headers should reflect the modified values.
Actual behavior
The injected headers contain the original request headers instead of the modified ones, which are only available from the HttpHeaders object.
Describe the bug
When modifying or create a new header in a @ServerRequestFilter annotated method (with or without preMatching = true) does not have an effect on method paramteres injected with
@RestHeader
or@HeaderParam
.E.g. for a method like
you will get the original header for the user agent field, no matter what you set to the headers via
ContainerRequestContext.getHeaders().putSingle()
in the@ServerRequestFilter
annotated method.However, the modified headers are available in the
HttpHeaders
object you can inject into the method.Expected behavior
The injected headers should reflect the modified values.
Actual behavior
The injected headers contain the original request headers instead of the modified ones, which are only available from the
HttpHeaders
object.How to Reproduce?
Reproducer:
2021-08-10_resteasy-reactive-modify-headers.zip
./gradlew quarkusDev
HttpHeaders
object. I'd expect them to be the same.NewHeaderCreatingRequestFilter
andUserAgentRequestFilter
create a new header and modifiy the user agent header respectively.Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.1.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: