{"record":{"id":"cdbacac807266f58","repo":"quarkusio/quarkus","slug":"no-multipart-delimiter-found","errorCode":null,"errorMessage":"No Multipart delimiter found","messagePattern":"No Multipart delimiter found","errorType":"exception","errorClass":"ErrorDataDecoderException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java","lineNumber":699,"sourceCode":"            return null;\n        }\n        if (newline.equals(delimiter)) {\n            currentStatus = dispositionStatus;\n            return decodeMultipart(dispositionStatus);\n        }\n        if (newline.equals(delimiter + \"--\")) {\n            // CLOSEDELIMITER or MIXED CLOSEDELIMITER found\n            currentStatus = closeDelimiterStatus;\n            if (currentStatus == MultiPartStatus.HEADERDELIMITER) {\n                // MIXEDCLOSEDELIMITER\n                // end of the Mixed part\n                currentFieldAttributes = null;\n                return decodeMultipart(MultiPartStatus.HEADERDELIMITER);\n            }\n            return null;\n        }\n        undecodedChunk.readerIndex(readerIndex);\n        throw new ErrorDataDecoderException(\"No Multipart delimiter found\");\n    }\n\n    /**\n     * Find the next Disposition\n     *\n     * @return the next InterfaceHttpData if any\n     * @throws ErrorDataDecoderException\n     */\n    private InterfaceHttpData findMultipartDisposition() {\n        int readerIndex = undecodedChunk.readerIndex();\n        if (currentStatus == MultiPartStatus.DISPOSITION) {\n            currentFieldAttributes = new TreeMap<>(CaseIgnoringComparator.INSTANCE);\n        }\n        // read many lines until empty line with newline found! Store all data\n        while (!skipOneLine()) {\n            String newline;\n            try {\n                skipControlCharacters(undecodedChunk);","sourceCodeStart":681,"sourceCodeEnd":717,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/multipart/QuarkusMultipartResponseDecoder.java#L681-L717","documentation":"findMultipartDelimiter scans the undecoded chunk for the next multipart boundary. If it consumes the chunk without finding the expected '--boundary' delimiter, it resets the reader index and throws ErrorDataDecoderException('No Multipart delimiter found').","triggerScenarios":"The stream contains data that does not match the boundary declared in the response Content-Type — e.g. boundary changed mid-stream, body is not actually multipart despite the header, or the boundary line is corrupted.","commonSituations":"Proxy/gateway rewriting the body but not the boundary; server using a different boundary than advertised; binary corruption (compression/charset translation) of the body; response is actually not multipart.","solutions":["Compare the boundary in the response Content-Type with the actual delimiters in the body and fix the server/proxy mismatch","Disable any body-rewriting (compression, charset transcoding) between server and client","Verify the response body really is multipart before decoding","Catch ErrorDataDecoderException and fall back to raw body handling"],"exampleFix":"// before (server)\nContent-Type: multipart/mixed; boundary=A\nbody delimiters: --B\n// after\nContent-Type: multipart/mixed; boundary=B","handlingStrategy":"try-catch","validationCode":"String boundary = extractBoundary(response.headers().get(HttpHeaderNames.CONTENT_TYPE));\nif (boundary != null && !bodyContains(\"--\" + boundary)) { /* body/header mismatch: don't decode */ }","typeGuard":null,"tryCatchPattern":"try { decoder.offer(chunk); } catch (ErrorDataDecoderException e) { if (e.getMessage().contains(\"No Multipart delimiter\")) { /* fall back to raw body */ } }","preventionTips":["Keep body rewriting (compression/transcoding) disabled between server and client","Assert boundary consistency in integration tests","Verify the response is truly multipart before decoding"],"tags":["http","multipart","boundary"],"backgroundTag":"multipart-boundary-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}