Skip to content

Commit b6ad329

Browse files
author
Stephane Landelle
committed
Make multipart FilePart charset optional, close AsyncHttpClient#524
1 parent 050e534 commit b6ad329

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
package org.asynchttpclient.multipart;
1414

1515
import static org.asynchttpclient.util.StandardCharsets.US_ASCII;
16-
import static org.asynchttpclient.util.StandardCharsets.ISO_8859_1;
1716

1817
import java.io.ByteArrayOutputStream;
1918
import java.io.IOException;
@@ -30,11 +29,6 @@ public abstract class AbstractFilePart extends PartBase {
3029
*/
3130
public static final String DEFAULT_CONTENT_TYPE = "application/octet-stream";
3231

33-
/**
34-
* Default charset of file attachments.
35-
*/
36-
public static final String DEFAULT_CHARSET = ISO_8859_1.name();
37-
3832
/**
3933
* Default transfer encoding of file attachments.
4034
*/
@@ -59,11 +53,10 @@ public abstract class AbstractFilePart extends PartBase {
5953
* @param contentType
6054
* the content type for this part, if <code>null</code> the {@link #DEFAULT_CONTENT_TYPE default} is used
6155
* @param charset
62-
* the charset encoding for this part, if <code>null</code> the {@link #DEFAULT_CHARSET default} is used
63-
* @param contentId
56+
* the charset encoding for this part
6457
*/
6558
public AbstractFilePart(String name, String contentType, String charset, String contentId) {
66-
super(name, contentType == null ? DEFAULT_CONTENT_TYPE : contentType, charset == null ? DEFAULT_CHARSET : charset,
59+
super(name, contentType == null ? DEFAULT_CONTENT_TYPE : contentType, charset,
6760
DEFAULT_TRANSFER_ENCODING, contentId);
6861
}
6962

0 commit comments

Comments
 (0)