Skip to content

Commit 293b6d2

Browse files
author
Stephane Landelle
committed
AbstractFilePart.visitDispositionHeader should honor defined charset, close AsyncHttpClient#738
1 parent 413aa9f commit 293b6d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/src/main/java/org/asynchttpclient/multipart/AbstractFilePart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected void visitDispositionHeader(PartVisitor visitor) throws IOException {
6969
if (fileName != null) {
7070
visitor.withBytes(FILE_NAME_BYTES);
7171
visitor.withByte(QUOTE_BYTE);
72-
visitor.withBytes(fileName.getBytes(US_ASCII));
72+
visitor.withBytes(fileName.getBytes(getCharset() != null ? getCharset() : US_ASCII));
7373
visitor.withByte(QUOTE_BYTE);
7474
}
7575
}

0 commit comments

Comments
 (0)