Add an option to disable chunked encoding.#581
Conversation
There was a problem hiding this comment.
For your use case this class will never be used so this is fine but it may be confusing if another developer sets the configuration option and it isn't honored in the retry policy.
Are you saying i don't do this? - i need to create a separate overloaded class to avoid compiler errors. if you don't wish to set the value here. the only reason i did that because i couldn't find a cleaner way to pass down s3ClientOptions. Should i pass this value in EndpointResolver? it doesn't look like the right place. |
a8d94cb to
f75a905
Compare
This is done to allow sha256 calculation of proper payload in PutObjectRequest and UploadPartRequest. Fixes aws#580
f75a905 to
c99559b
Compare
|
Need to test this properly locally, please do not merge. |
|
Hold off on testing. I had to rethink how this was implemented. I'll open a PR to show the changes and we can discuss if that meets your needs. |
Oh okay cool. |
|
Just created a pull request. During testing discovered this would not work for our SignerFactory as it expects a default constructor to be found and there's no clean way to get the S3ClientOptions to the Factory to instantiate the signer with the right configuration. The SignerFactory would be used to create the V4 signer if the signerRegionOverride was set. I'm guessing your customers are using the ENFORCE_SIG_V4 system property to enable SigV4 for S3 so you wouldn't have hit a code path that instantiates the SigV4 signer via SignerFactory. This change includes your new option in the request so that it's available no matter how the signer is created, via the factory or explicitly via a call to it's constructor. Let me know what you think and if this meets your needs. This PR isn't intended to be merged, if it's satisfactory I'll accept your PR and stage the changes internally. |
This is perfect thank you +1 on your change. |
|
Awesome! I'll run the integration tests over night and get this merged in tomorrow if all goes well. |
Cool let me know if you need me to do something on my end. |
|
Can you confirm in the comments of this PR that you are submitting the code under the Apache 2.0 license? |
Yes i confirm this patch is submitted under Apache 2.0 License. |
|
BTW tests passed, just waiting for internal approval and I'll get this merged in. |
|
Approved. Thanks for the contribution! This will be available in the first release of 2016 :) |
Add an option to disable chunked encoding.
No thank you. :-) |
This is done to allow sha256 calculation of proper
payload in PutObjectRequest and UploadPartRequest.
Fixes #580