Skip to content

Commit

Permalink
Minor clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbodart committed Apr 17, 2016
1 parent c052792 commit 2bf6da0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/com/googlecode/utterlyidle/aws/AwsHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,15 @@ public AwsHttpClient(final AuditHandler auditHandler, final AwsCredentialScope s
public Response handle(Request request) throws Exception {
AwsRequestDate date = AwsRequestDate.awsRequestDate(clock.now());

Request fullRequest = modify(request,
HttpMessage.Builder.header("host", request.uri().host()),
HttpMessage.Builder.header("x-amz-date", date.full())
);
Request fullRequest = request.
header("host", request.uri().host()).
header("x-amz-date", date.full());

AwsCanonicalRequest canonicalRequest = new AwsCanonicalRequest(fullRequest);

Request signedRequest = modify(fullRequest,
HttpMessage.Builder.header("Authorization", buildAuthHeader(canonicalRequest, date)),
HttpMessage.Builder.header("x-amz-content-sha256", canonicalRequest.payloadHash())
);
Request signedRequest = fullRequest.
header("Authorization", buildAuthHeader(canonicalRequest, date)).
header("x-amz-content-sha256", canonicalRequest.payloadHash());

return handler.handle(signedRequest);
}
Expand Down

0 comments on commit 2bf6da0

Please sign in to comment.