[JAVA-15024] Changed HttpMultipartMode from STRICT to LEGACY (#13446)
Co-authored-by: panagiotiskakos <panagiotis.kakos@libra-is.com>
This commit is contained in:
parent
940cc28ef5
commit
221790a93f
|
@ -124,7 +124,7 @@ class HttpClientMultipartLiveTest {
|
||||||
final File file = new File(url2.getPath());
|
final File file = new File(url2.getPath());
|
||||||
final String message = "This is a multipart post";
|
final String message = "This is a multipart post";
|
||||||
final MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
final MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||||
builder.setMode(HttpMultipartMode.STRICT);
|
builder.setMode(HttpMultipartMode.LEGACY);
|
||||||
builder.addBinaryBody("file", file, ContentType.DEFAULT_BINARY, IMAGEFILENAME);
|
builder.addBinaryBody("file", file, ContentType.DEFAULT_BINARY, IMAGEFILENAME);
|
||||||
builder.addBinaryBody("upstream", inputStream, ContentType.create("application/zip"), ZIPFILENAME);
|
builder.addBinaryBody("upstream", inputStream, ContentType.create("application/zip"), ZIPFILENAME);
|
||||||
builder.addTextBody("text", message, ContentType.TEXT_PLAIN);
|
builder.addTextBody("text", message, ContentType.TEXT_PLAIN);
|
||||||
|
@ -153,7 +153,7 @@ class HttpClientMultipartLiveTest {
|
||||||
final String message = "This is a multipart post";
|
final String message = "This is a multipart post";
|
||||||
final byte[] bytes = "binary code".getBytes();
|
final byte[] bytes = "binary code".getBytes();
|
||||||
final MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
final MultipartEntityBuilder builder = MultipartEntityBuilder.create();
|
||||||
builder.setMode(HttpMultipartMode.STRICT);
|
builder.setMode(HttpMultipartMode.LEGACY);
|
||||||
builder.addBinaryBody("file", bytes, ContentType.DEFAULT_BINARY, TEXTFILENAME);
|
builder.addBinaryBody("file", bytes, ContentType.DEFAULT_BINARY, TEXTFILENAME);
|
||||||
builder.addTextBody("text", message, ContentType.TEXT_PLAIN);
|
builder.addTextBody("text", message, ContentType.TEXT_PLAIN);
|
||||||
final HttpEntity entity = builder.build();
|
final HttpEntity entity = builder.build();
|
||||||
|
|
Loading…
Reference in New Issue