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

Quarkus Rest AbstractJsonMessageBodyReader with wrong case-sensitive content-type header handling #40244

Closed
antonwiens opened this issue Apr 24, 2024 · 4 comments · Fixed by #40255
Milestone

Comments

@antonwiens
Copy link

antonwiens commented Apr 24, 2024

I updated to quarkus 3.9 and noticed different behavior in content-type matching.
As of RFC (https://datatracker.ietf.org/doc/html/rfc2045#section-5.1) the content-type header value should be handled case-insensitive but the handling in quarkus resteasy-reactive is case-sensitive. only the subtype-Part is handled case-insensitive in the AbstractJsonMessageBodyReader:

This issue occured to me, because i updated from Quarkus 3.2.8 to quarkus 3.9.4 and my client sends "Application/json" as content-type which is rejected with a message containing that no messagebodyreader can be found.

Can you please make this case-insensitive again?

@antonwiens
Copy link
Author

This part:
subtype.endsWith("+json")

should also be changed to be case insensitive

@geoand
Copy link
Contributor

geoand commented Apr 24, 2024

Would you like to provide a PR with the fix you have in mind?

Copy link

quarkus-bot bot commented Apr 24, 2024

/cc @FroMage (resteasy-reactive), @stuartwdouglas (resteasy-reactive)

@antonwiens
Copy link
Author

antonwiens commented Apr 24, 2024

Would you like to provide a PR with the fix you have in mind?

Sure, i can try it and add some tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants