> @@ -171,8 +171,7 @@ private void appendPayloadMetadata(HttpRequest request, 
> StringBuilder buffer) {
>     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");

> but, are you assuming there could be multiple Range headers

No, I am just wondering what the code would do if there _were_ multiple 
headers, since we're evidently not performing any checks on this. But the 
`nullToEmpty` function seems to take care of this by returning the _first_ 
value from the input collection if that is not `null` or empty, so we're 
actually getting the same functionality here.

Fine to leave as-is, in other words...thanks for explaining!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/163/files#r6690691

Reply via email to