diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/runtime/src/main/java/io/quarkus/resteasy/reactive/qute/runtime/TemplateResponseUniHandler.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/runtime/src/main/java/io/quarkus/resteasy/reactive/qute/runtime/TemplateResponseUniHandler.java index 2ad245ef3e069..10b7dc86e0e12 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/runtime/src/main/java/io/quarkus/resteasy/reactive/qute/runtime/TemplateResponseUniHandler.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive-qute/runtime/src/main/java/io/quarkus/resteasy/reactive/qute/runtime/TemplateResponseUniHandler.java @@ -3,6 +3,8 @@ import static io.quarkus.resteasy.reactive.qute.runtime.Util.*; import static io.quarkus.resteasy.reactive.qute.runtime.Util.toUni; +import javax.ws.rs.core.MediaType; + import org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext; import org.jboss.resteasy.reactive.server.spi.ServerRestHandler; @@ -33,8 +35,9 @@ public void handle(ResteasyReactiveRequestContext requestContext) { } private Uni createUni(ResteasyReactiveRequestContext requestContext, TemplateInstance result, Engine engine) { - setSelectedVariant(result, requestContext.getRequest(), + MediaType mediaType = setSelectedVariant(result, requestContext.getRequest(), requestContext.getHttpHeaders().getAcceptableLanguages()); + requestContext.setResponseContentType(mediaType); return toUni(result, engine); }