Skip to content

Commit

Permalink
Fixed multipart
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHolger committed Sep 14, 2023
1 parent ea3b909 commit 939065e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/javawebstack/http/router/Exchange.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,13 @@ public Exchange enableMultipart(PartContentCache cache) {
HeaderValue contentType = new HeaderValue(getContentType());
if(!contentType.getValue().toLowerCase(Locale.ROOT).equals("multipart/form-data"))
return this;
body = new byte[0];
byte[] boundary = contentType.getDirectives().get("boundary").getBytes();
try {
InputStream stream;
if(body != null) {
stream = new ByteArrayInputStream(body);
} else {
body = new byte[0];
stream = socket.getInputStream();
}
parts = Part.parse(stream, boundary, cache);
Expand Down

0 comments on commit 939065e

Please sign in to comment.