> + HttpRequest.Builder requestBuilder,
> + String method,
> + URI endpoint,
> + Payload payload
> + ) {
> + InputStream payloadStream;
> + try {
> + payloadStream = usePayloadForQueryParameters(method, payload) ?
> + getQueryStringContent(endpoint)
> + : getPayloadContentWithoutQueryString(payload);
> + } catch (IOException e) {
> + throw new HttpException("Unable to open stream before calculate
> AWS4 signature", e);
> + }
> + String contentSha256 =
> base16().lowerCase().encode(hash(payloadStream));
> + try {
> + payloadStream.reset();
payload stream use calculate content hash.
if can not be repeatable, the payload cannot append to http request body.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/678/files#r25842533