mirror of https://github.com/apache/jclouds.git
Trivial: Remove unnecessary for loop in Atmos signing
This commit is contained in:
parent
8207c53cf2
commit
e017b8904c
|
@ -171,8 +171,7 @@ public class SignRequest implements HttpRequestFilter {
|
||||||
void appendHttpHeaders(HttpRequest request, StringBuilder toSign) {
|
void appendHttpHeaders(HttpRequest request, StringBuilder toSign) {
|
||||||
// Only the value is used, not the header
|
// Only the value is used, not the header
|
||||||
// name. If a request does not include the header, this is an empty string.
|
// name. If a request does not include the header, this is an empty string.
|
||||||
for (String header : new String[] { "Range" })
|
toSign.append(HttpUtils.nullToEmpty(request.getHeaders().get("Range")).toLowerCase()).append("\n");
|
||||||
toSign.append(HttpUtils.nullToEmpty(request.getHeaders().get(header)).toLowerCase()).append("\n");
|
|
||||||
// Standard HTTP header, in UTC format. Only the date value is used, not the header name.
|
// Standard HTTP header, in UTC format. Only the date value is used, not the header name.
|
||||||
toSign.append(request.getFirstHeaderOrNull(HttpHeaders.DATE)).append("\n");
|
toSign.append(request.getFirstHeaderOrNull(HttpHeaders.DATE)).append("\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue