-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
RESTEasy reactive passed null media type for MessageBodyWriters #25263
Comments
/cc @FroMage, @geoand, @stuartwdouglas |
Thanks for reporting. Do you mind attaching a sample project that exhibits this behavior? |
You can find reproducers/tests for this issue at https://github.com/sithmein/bugs-in-quarkus |
I'm surprised that none of the TCK tests actually tested this... In any case, #25291 fixes the null media type issue. |
Properly pass media type to MessageBodyWriters
Fixes: quarkusio#25263 (cherry picked from commit de4b81a)
Fixes: quarkusio#25263 (cherry picked from commit de4b81a)
Fixes: quarkusio#25263 (cherry picked from commit de4b81a)
Fixes: quarkusio#25263 (cherry picked from commit de4b81a)
Describe the bug
Consider the following JAX-RS resource class and
MessageBodyWriter
:Invoking the resource method with quarkus-resteasy-reactive will result in an exception because the
mediaType
parameter passed into the message body writer isnull
. This works without problems in the non-reactive version and any other JAX-RS framework that I have used in the past.It works if the Response explicitly defines its media type it works, but according to section 3.8 of the JAX-RS specification this is not necessary and the media type can be derived from
@Produces
annotations.Expected behavior
The message body writer should receive the correct media type (application/json in this case), according to the JAX-RS specification.
Actual behavior
The media type is
null
.How to Reproduce?
Run the provided example with reactive RESTEasy.
Output of
uname -a
orver
No response
Output of
java -version
17
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.8.2.Final
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: