kopia lustrzana https://github.com/gaul/s3proxy
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
rodzic
01c43c9f1b
commit
ed29debdf9
2
pom.xml
2
pom.xml
|
@ -262,7 +262,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.amazonaws</groupId>
|
<groupId>com.amazonaws</groupId>
|
||||||
<artifactId>aws-java-sdk-s3</artifactId>
|
<artifactId>aws-java-sdk-s3</artifactId>
|
||||||
<version>1.9.28.1</version>
|
<version>1.10.38</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -228,18 +228,10 @@ public final class S3AwsSdkTest {
|
||||||
client.initiateMultipartUpload(initRequest);
|
client.initiateMultipartUpload(initRequest);
|
||||||
String uploadId = initResponse.getUploadId();
|
String uploadId = initResponse.getUploadId();
|
||||||
|
|
||||||
ObjectMetadata metadata = new ObjectMetadata();
|
|
||||||
metadata.setContentType("application/unknown");
|
|
||||||
UploadPartRequest uploadRequest = new UploadPartRequest()
|
UploadPartRequest uploadRequest = new UploadPartRequest()
|
||||||
.withBucketName(containerName).withKey(key)
|
.withBucketName(containerName).withKey(key)
|
||||||
.withUploadId(uploadId).withPartNumber(1)
|
.withUploadId(uploadId).withPartNumber(1)
|
||||||
.withInputStream(byteSource.openStream())
|
.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);
|
.withPartSize(size);
|
||||||
|
|
||||||
UploadPartResult uploadPartResult = client.uploadPart(uploadRequest);
|
UploadPartResult uploadPartResult = client.uploadPart(uploadRequest);
|
||||||
|
|
Ładowanie…
Reference in New Issue