Trivial: Remove unnecessary for loop in Atmos signing

This commit is contained in:
Niraj Tolia 2013-09-30 16:39:34 -07:00 committed by Andrew Gaul
parent 8207c53cf2
commit e017b8904c
1 changed files with 1 additions and 2 deletions

View File

@ -171,8 +171,7 @@ public class SignRequest implements HttpRequestFilter {
void appendHttpHeaders(HttpRequest request, StringBuilder toSign) {
// Only the value is used, not the header
// 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(header)).toLowerCase()).append("\n");
toSign.append(HttpUtils.nullToEmpty(request.getHeaders().get("Range")).toLowerCase()).append("\n");
// Standard HTTP header, in UTC format. Only the date value is used, not the header name.
toSign.append(request.getFirstHeaderOrNull(HttpHeaders.DATE)).append("\n");
}