> @@ -149,8 +146,8 @@ private void appendCanonicalizedHeaders(HttpRequest 
> request, StringBuilder toSig
>              // replacing any
>              // newline characters and extra embedded white spaces in the 
> value.
>              for (String value : request.getHeaders().get(header)) {
> -               value = Strings2.replaceAll(value, TWO_SPACE_PATTERN, " ");
> -               value = Strings2.replaceAll(value, NEWLINE_PATTERN, "");
> +               value = value.replace("  ", " ");

What should happen here if the input contains _three_ spaces? `"foo   
bar".replace("  ", " ")` returns `"foo  bar"`, i.e. a string that still has two 
spaces.

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

Reply via email to