quarkusio/quarkus · error · ErrorDataDecoderException
Unable to parse multipart response - No delimiter specified
Error message
Unable to parse multipart response - No delimiter specified
What it means
Thrown when the Content-Type header exists but contains no boundary= parameter, so getMultipartDataBoundary returns null. Without a delimiter the decoder cannot split multipart parts; it destroys itself and fails fast with ErrorDataDecoderException.
Source
Thrown at independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java:232
String contentTypeValue = this.response.headers().get(HttpHeaderNames.CONTENT_TYPE);
if (contentTypeValue == null) {
throw new ErrorDataDecoderException("No '" + HttpHeaderNames.CONTENT_TYPE + "' header present.");
}
String[] dataBoundary = getMultipartDataBoundary(contentTypeValue);
if (dataBoundary != null) {
multipartDataBoundary = dataBoundary[0];
if (dataBoundary.length > 1 && dataBoundary[1] != null) {
try {
this.charset = Charset.forName(dataBoundary[1]);
} catch (IllegalCharsetNameException e) {
throw new ErrorDataDecoderException(e);
}
}
} else {
destroy();
throw new ErrorDataDecoderException("Unable to parse multipart response - No delimiter specified");
}
currentStatus = MultiPartStatus.HEADERDELIMITER;
try {
if (this.response instanceof HttpContent) {
// Offer automatically if the given request is als type of HttpContent
// See #1089
offer((HttpContent) this.response);
} else {
parseBody();
}
} catch (Throwable e) {
destroy();
PlatformDependent.throwException(e);
}
}
private void checkDestroyed() {View on GitHub (pinned to e1c734241f)
Solutions
- Fix the server/gateway so the multipart Content-Type always includes a boundary parameter
- If the boundary is known out-of-band, set it in the Content-Type before decoding
- Verify the response is genuinely multipart before using the multipart decoder
- Catch ErrorDataDecoderException and handle the response as a single-part body
Example fix
// before (server) Content-Type: multipart/form-data // after Content-Type: multipart/form-data; boundary=----quarkusBoundary123
Defensive patterns
Strategy: validation
Validate before calling
String ct = response.headers().get(HttpHeaderNames.CONTENT_TYPE);
if (ct != null && ct.startsWith("multipart/") && !ct.toLowerCase().contains("boundary=")) {
throw new IllegalArgumentException("Multipart Content-Type without boundary");
} Try / catch
try { decoder = new QuarkusMultipartResponseDecoder(response, factory, charset); } catch (ErrorDataDecoderException e) { /* handle missing boundary: read raw */ } Prevention
- Validate boundary= presence in the Content-Type before decoding
- Fix gateway code that reconstructs Content-Type strings
When it happens
Trigger: Receiving a response whose Content-Type is multipart/* but lacks the boundary parameter (e.g. 'multipart/form-data' with no '; boundary=...'), then offering its content to QuarkusMultipartResponseDecoder.
Common situations: Server bug omitting the boundary; a gateway rewriting the Content-Type and dropping the boundary; manually constructed multipart Content-Type strings missing '; boundary=...'.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- No Multipart delimiter found
- Cannot create a Encoder if request is a TRACE
- Needs a boundary value
- No 'Content-Type' header present.
- Illegal charset in multipart response Content-Type (wrapped)
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/7acd2c6af90ebd72.
Report an issue: GitHub.