Skip to content

Commit 19e687e

Browse files
authored
Read possible Content-Type header updates when parsing Multipart
When parsing Multipart requests, the MultPartParser did read the original HTTP headers from the `ResteasyReactiveRequestContext#serverRequest()`. As a consequence, it was unable to incorporate any changes to Content-Type header done on the server-side using ContainerRequestFilter or other mechanisms.
1 parent d3d1131 commit 19e687e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/core/multipart/MultiPartParserDefinition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public MultiPartParserDefinition(Supplier<Executor> executorSupplier, final Path
7171

7272
@Override
7373
public FormDataParser create(final ResteasyReactiveRequestContext exchange, Set<String> fileFormNames) {
74-
String mimeType = exchange.serverRequest().getRequestHeader(HttpHeaders.CONTENT_TYPE);
74+
String mimeType = exchange.getHttpHeaders().getHeaderString(HttpHeaders.CONTENT_TYPE);
7575
if (mimeType != null && mimeType.startsWith(MULTIPART_FORM_DATA)) {
7676
String boundary = HeaderUtil.extractQuotedValueFromHeader(mimeType, "boundary");
7777
if (boundary == null) {

0 commit comments

Comments
 (0)