Skip to content

Commit

Permalink
Use proper media type when executing writer interceptors
Browse files Browse the repository at this point in the history
The one from the response can be null if we return a partial response
but the type is defined by @produces.
We need to consider the one from the context.

Fixes #34839
  • Loading branch information
gsmet committed Oct 29, 2024
1 parent 359724e commit 43ab439
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ public static boolean invokeWriter(ResteasyReactiveRequestContext context, Objec
public static void runWriterInterceptors(ResteasyReactiveRequestContext context, Object entity, MessageBodyWriter writer,
Response response, WriterInterceptor[] writerInterceptor, ServerSerialisers serialisers) throws IOException {
WriterInterceptorContextImpl wc = new WriterInterceptorContextImpl(context, writerInterceptor, writer,
context.getAllAnnotations(), entity.getClass(), context.getGenericReturnType(), entity, response.getMediaType(),
response.getHeaders(), serialisers);
context.getAllAnnotations(), entity.getClass(), context.getGenericReturnType(), entity,
context.getResponseContentType().getMediaType(), response.getHeaders(), serialisers);
wc.proceed();
}

Expand Down

0 comments on commit 43ab439

Please sign in to comment.