Use decoded content length when provided

Previously S3Proxy provided an incorrect Content-Length header when
using V4 signing which providers rejected.
pull/124/head
Andrew Gaul 2016-01-30 19:08:27 -08:00
rodzic 291db19898
commit cea4a42922
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -1501,7 +1501,7 @@ final class S3ProxyHandler extends AbstractHandler {
BlobBuilder.PayloadBlobBuilder builder = blobStore
.blobBuilder(blobName)
.payload(is)
.contentLength(request.getContentLength());
.contentLength(contentLength);
addContentMetdataFromHttpRequest(builder, request);
if (contentMD5 != null) {
builder = builder.contentMD5(contentMD5);