We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26e7372 commit b3d20b1Copy full SHA for b3d20b1
client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartUtils.java
@@ -104,9 +104,9 @@ private static byte[] generateBoundary() {
104
return bytes;
105
}
106
107
- private static String computeContentType(String base, byte[] boundary) {
+ private static String computeContentType(CharSequence base, byte[] boundary) {
108
StringBuilder buffer = StringUtils.stringBuilder().append(base);
109
- if (!base.endsWith(";"))
+ if (base.length() != 0 && base.charAt(base.length() - 1) != ';')
110
buffer.append(';');
111
return buffer.append(" boundary=").append(new String(boundary, US_ASCII)).toString();
112
0 commit comments