We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
After the switch to resteasy reactive my request filters don't work anymore.
Accept Header set in the pre-matching request filter shall decide the routing to the resource.
Setting the Accept Header inside the pre-matching request filter doesn't affect routing.
Having following filter:
@PreMatching @Provider public class SetAcceptHeaderFilter implements ContainerRequestFilter { @Override public void filter(ContainerRequestContext requestContext) { requestContext.getHeaders().putSingle(HttpHeaders.ACCEPT, MediaType.TEXT_PLAIN); } }
and following Resource:
@Path("/hello") public class GreetingResource { @GET @Produces(MediaType.TEXT_PLAIN) public Response helloText() { return Response.ok("correct").build(); } @GET @Produces(MediaType.TEXT_HTML) public Response helloHtml() { return Response.ok("shall not happen").build(); }
Try to call it from the browser.
uname -a
ver
No response
java -version
java 17.0.9 2023-10-17 LTS
2.6.12.Final and 3.6.4
mvnw --version
gradlew --version
Apache Maven 3.6.3
Do you know some workaround to this issue? Such a thing shall be pretty common. I'm trying to implement CXF's _type Query Parameter,
The text was updated successfully, but these errors were encountered:
Use headers set in PreMatching filter during media type negotiation
35fab48
Fixes: quarkusio#38130
d4619c4
Thanks for reporting. #38131 fixes the issue
Sorry, something went wrong.
/cc @FroMage (resteasy-reactive), @stuartwdouglas (resteasy-reactive)
Merge pull request #38131 from geoand/#38130
3922fca
Successfully merging a pull request may close this issue.
Describe the bug
After the switch to resteasy reactive my request filters don't work anymore.
Expected behavior
Accept Header set in the pre-matching request filter shall decide the routing to the resource.
Actual behavior
Setting the Accept Header inside the pre-matching request filter doesn't affect routing.
How to Reproduce?
Having following filter:
and following Resource:
Try to call it from the browser.
Output of
uname -a
orver
No response
Output of
java -version
java 17.0.9 2023-10-17 LTS
Quarkus version or git rev
2.6.12.Final and 3.6.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.6.3
Additional information
Do you know some workaround to this issue? Such a thing shall be pretty common. I'm trying to implement CXF's _type Query Parameter,
The text was updated successfully, but these errors were encountered: