Skip to content

Commit

Permalink
Use decoded content length when provided
Browse files Browse the repository at this point in the history
Previously S3Proxy provided an incorrect Content-Length header when
using V4 signing which providers rejected.
  • Loading branch information
gaul committed Jan 31, 2016
1 parent 291db19 commit cea4a42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/gaul/s3proxy/S3ProxyHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1501,7 +1501,7 @@ private void handlePutBlob(HttpServletRequest request,
BlobBuilder.PayloadBlobBuilder builder = blobStore
.blobBuilder(blobName)
.payload(is)
.contentLength(request.getContentLength());
.contentLength(contentLength);
addContentMetdataFromHttpRequest(builder, request);
if (contentMD5 != null) {
builder = builder.contentMD5(contentMD5);
Expand Down

0 comments on commit cea4a42

Please sign in to comment.