Skip to content

Commit 939065e

Browse files
committed
Fixed multipart
1 parent ea3b909 commit 939065e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/javawebstack/http/router/Exchange.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ public Exchange enableMultipart(PartContentCache cache) {
330330
HeaderValue contentType = new HeaderValue(getContentType());
331331
if(!contentType.getValue().toLowerCase(Locale.ROOT).equals("multipart/form-data"))
332332
return this;
333-
body = new byte[0];
334333
byte[] boundary = contentType.getDirectives().get("boundary").getBytes();
335334
try {
336335
InputStream stream;
337336
if(body != null) {
338337
stream = new ByteArrayInputStream(body);
339338
} else {
339+
body = new byte[0];
340340
stream = socket.getInputStream();
341341
}
342342
parts = Part.parse(stream, boundary, cache);

0 commit comments

Comments
 (0)