Skip to content
New issue

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

Changing Accept Header in PreMatching filter isn't considered by MessageBodyWriter #41097

Closed
myroch opened this issue Jun 10, 2024 · 1 comment · Fixed by #41111
Closed

Changing Accept Header in PreMatching filter isn't considered by MessageBodyWriter #41097

myroch opened this issue Jun 10, 2024 · 1 comment · Fixed by #41111
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@myroch
Copy link

myroch commented Jun 10, 2024

Describe the bug

#40019 fixed the routing to correct MessageBodyWriters in case that response is POJO. For JAX WS Response remains the old behavior.

Expected behavior

Accept Header set in the pre-matching request filter shall decide which MessageBodyWriter will be selected, even if returned value is JAX WS Response.

Actual behavior

Setting the Accept Header inside the pre-matching request filter doesn't affect which MessageBodyWriter is being selected in case that return type is JAX WS Response.

How to Reproduce?

checkout https://github.com/myroch/quarkus-prematching-servermessagebodywriter-bug
run ExampleResourceTest

Output of uname -a or ver

No response

Output of java -version

java 17.0.9 2023-10-17 LTS

Quarkus version or git rev

3.11.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6

Additional information

No response

@geoand
Copy link
Contributor

geoand commented Jun 11, 2024

Thanks for reporting.

#41111 takes care of it and should be backported to both 3,11 and 3.8 (the LTS release)

geoand added a commit to geoand/quarkus that referenced this issue Jun 11, 2024
geoand added a commit that referenced this issue Jun 11, 2024
Take MediaType set in pre-match filter into when returning Response
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone Jun 11, 2024
@gsmet gsmet modified the milestones: 3.12 - main, 3.11.2 Jun 11, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Jun 11, 2024
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Jul 31, 2024
@gsmet gsmet modified the milestones: 3.11.2, 3.8.6 Aug 14, 2024
gsmet pushed a commit to gsmet/quarkus that referenced this issue Aug 14, 2024
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants