Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -340,15 +340,15 @@ public class FormHttpMessageConverter implements HttpMessageConverter<MultiValue
|
||||
}
|
||||
}
|
||||
|
||||
private void writeMultipart(final MultiValueMap<String, Object> parts,
|
||||
HttpOutputMessage outputMessage) throws IOException {
|
||||
private void writeMultipart(final MultiValueMap<String, Object> parts, HttpOutputMessage outputMessage)
|
||||
throws IOException {
|
||||
|
||||
final byte[] boundary = generateMultipartBoundary();
|
||||
Map<String, String> parameters = new LinkedHashMap<>(2);
|
||||
if (!isFilenameCharsetSet()) {
|
||||
parameters.put("charset", this.charset.name());
|
||||
}
|
||||
parameters.put("boundary", new String(boundary, "US-ASCII"));
|
||||
parameters.put("boundary", new String(boundary, StandardCharsets.US_ASCII));
|
||||
|
||||
MediaType contentType = new MediaType(MediaType.MULTIPART_FORM_DATA, parameters);
|
||||
HttpHeaders headers = outputMessage.getHeaders();
|
||||
|
||||
Reference in New Issue
Block a user