Skip to content

Commit

Permalink
Merge pull request #19157 from geoand/multipart-polish
Browse files Browse the repository at this point in the history
Apply minor polish to MultiPartParserDefinition
  • Loading branch information
geoand authored Aug 2, 2021
2 parents 1173262 + d1471dd commit 72cc2d6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ public void beginPart(final CaseInsensitiveMap<String> headers) {
if (fileName != null && fileSizeThreshold == 0) {
try {
if (tempFileLocation != null) {
file = Files.createTempFile(tempFileLocation, "undertow", "upload");
file = Files.createTempFile(tempFileLocation, "resteasy-reactive", "upload");
} else {
file = Files.createTempFile("undertow", "upload");
file = Files.createTempFile("resteasy-reactive", "upload");
}
createdFiles.add(file);
fileChannel = FileChannel.open(file, StandardOpenOption.READ, StandardOpenOption.WRITE);
Expand All @@ -266,9 +266,9 @@ public void data(final ByteBuffer buffer) throws IOException {
if (file == null && fileName != null && fileSizeThreshold < this.currentFileSize) {
try {
if (tempFileLocation != null) {
file = Files.createTempFile(tempFileLocation, "undertow", "upload");
file = Files.createTempFile(tempFileLocation, "resteasy-reactive", "upload");
} else {
file = Files.createTempFile("undertow", "upload");
file = Files.createTempFile("resteasy-reactive", "upload");
}
createdFiles.add(file);

Expand Down Expand Up @@ -321,7 +321,7 @@ public void endPart() {
}
}

data.add(currentName, new String(contentBytes.toByteArray(), charset), charset, headers);
data.add(currentName, contentBytes.toString(charset), charset, headers);
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit 72cc2d6

Please sign in to comment.