Add support for signing chunked requests #20
Labels
bug
Something isn't working
enhancement
New feature or request
help wanted
Extra attention is needed
It looks like none of the implementations of the signing interceptor I was able to find supports signing chunked requests with Sigv4. Documentation states that we need a few things:
entity#setChunked(false)
.x-amz-decoded-content-length
header, specifying the size of the object in bytes. This is easy to do, but doesn't actually seem to be necessary for non-chunked requests that come with aContent-Length
.Repro in https://github.com/dblock/aws-request-signing-apache-interceptor/tree/repro-20
Long story:
We started from a bug, opensearch-project/OpenSearch#3640, then @jiten1551 reproduced it in https://github.com/jiten1551/Java-Client/tree/master. I forked that to https://github.com/dblock/opensearch-java-client-demo and added code to attempt supporting compressed requests, which seemed to work for a moment. I PRed kumjiten/Java-Client#1, but the next day the same code didn't work, which was also verified by @pgtgrly. I reached out to the AWS SDK team, and followed their recommendation to upgrade to AWS SDK 2.0 with the same results. Then I found this fork. With #31 it now supports Sigv4 signing GET and POST requests, but not chunked requests. We've also added a client
setChunkedEnabled
setting to explicitly control chunked transfer encoding in opensearch-project/OpenSearch#3864The text was updated successfully, but these errors were encountered: