We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea3b909 commit 939065eCopy full SHA for 939065e
src/main/java/org/javawebstack/http/router/Exchange.java
@@ -330,13 +330,13 @@ public Exchange enableMultipart(PartContentCache cache) {
330
HeaderValue contentType = new HeaderValue(getContentType());
331
if(!contentType.getValue().toLowerCase(Locale.ROOT).equals("multipart/form-data"))
332
return this;
333
- body = new byte[0];
334
byte[] boundary = contentType.getDirectives().get("boundary").getBytes();
335
try {
336
InputStream stream;
337
if(body != null) {
338
stream = new ByteArrayInputStream(body);
339
} else {
+ body = new byte[0];
340
stream = socket.getInputStream();
341
}
342
parts = Part.parse(stream, boundary, cache);
0 commit comments