Skip to content

Commit 2918d8f

Browse files
committed
tabs->spaces
1 parent ce85c81 commit 2918d8f

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,26 @@ public MultipartRequestEntity(Part[] parts, FluentCaseInsensitiveStringsMap requ
7979
this.parts = parts;
8080
String contentTypeHeader = requestHeaders.getFirstValue("Content-Type");
8181
if (isNonEmpty(contentTypeHeader)) {
82-
int boundaryLocation = contentTypeHeader.indexOf("boundary=");
83-
if (boundaryLocation != -1) {
84-
// boundary defined in existing Content-Type
85-
contentType = contentTypeHeader;
86-
multipartBoundary = MultipartEncodingUtil.getAsciiBytes((contentTypeHeader.substring(boundaryLocation + "boundary=".length()).trim()));
87-
} else {
88-
// generate boundary and append it to existing Content-Type
89-
multipartBoundary = generateMultipartBoundary();
82+
int boundaryLocation = contentTypeHeader.indexOf("boundary=");
83+
if (boundaryLocation != -1) {
84+
// boundary defined in existing Content-Type
85+
contentType = contentTypeHeader;
86+
multipartBoundary = MultipartEncodingUtil.getAsciiBytes((contentTypeHeader.substring(boundaryLocation + "boundary=".length()).trim()));
87+
} else {
88+
// generate boundary and append it to existing Content-Type
89+
multipartBoundary = generateMultipartBoundary();
9090
contentType = computeContentType(contentTypeHeader);
91-
}
91+
}
9292
} else {
93-
multipartBoundary = generateMultipartBoundary();
93+
multipartBoundary = generateMultipartBoundary();
9494
contentType = computeContentType(MULTIPART_FORM_CONTENT_TYPE);
9595
}
9696
}
9797

9898
private String computeContentType(String base) {
99-
StringBuilder buffer = new StringBuilder(base);
100-
if (!base.endsWith(";"))
101-
buffer.append(";");
99+
StringBuilder buffer = new StringBuilder(base);
100+
if (!base.endsWith(";"))
101+
buffer.append(";");
102102
return buffer.append(" boundary=").append(MultipartEncodingUtil.getAsciiString(multipartBoundary)).toString();
103103
}
104104

0 commit comments

Comments
 (0)