Upgrade to aws-java-sdk-s3 1.10.38

This addresses an issue with the SDK providing an incorrect
Content-Type when uploading a multipart part.  Fixes #80.
pull/101/head
Andrew Gaul 2015-12-02 22:21:55 +08:00
rodzic 01c43c9f1b
commit ed29debdf9
2 zmienionych plików z 1 dodań i 9 usunięć

Wyświetl plik

@ -262,7 +262,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId>
<version>1.9.28.1</version>
<version>1.10.38</version>
<scope>test</scope>
</dependency>
<dependency>

Wyświetl plik

@ -228,18 +228,10 @@ public final class S3AwsSdkTest {
client.initiateMultipartUpload(initRequest);
String uploadId = initResponse.getUploadId();
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentType("application/unknown");
UploadPartRequest uploadRequest = new UploadPartRequest()
.withBucketName(containerName).withKey(key)
.withUploadId(uploadId).withPartNumber(1)
.withInputStream(byteSource.openStream())
// TODO: AWS Java SDK incorrectly provides Content-Type:
// application/x-www-form-urlencoded; charset=utf-8
// which causes Jetty to parse the HTTP entity as if it
// were form-encoded. With a large upload this exhausts
// the Jetty form limit.
.withObjectMetadata(metadata)
.withPartSize(size);
UploadPartResult uploadPartResult = client.uploadPart(uploadRequest);