> +
> +import static com.google.common.io.BaseEncoding.base16;
> +
> +/**
> + * Converts ETag header values to byte arrays.
> + *
> + * @author Francis Devereux
> + */
> +public class ETagUtils {
> +   public static byte[] convertETagToHash(String eTag) {
> +      eTag = unquote(eTag);
> +      return base16().lowerCase().decode(eTag);
> +   }
> +
> +   private static String unquote(String eTag) {
> +      if (eTag.startsWith("\"") && eTag.endsWith("\"")) {

One thing to consider is weak etags. No self respecting blob store should 
return a weak etag; but if it does I suspect the /graceful/ production behavior 
here is to skip the leading /W of the header and continue as if it were a 
strong etag. 

In a /live/ test it may be useful to check new implementations (possibly a 
poor-persons blob store backed by tomcat) actually return a weak etag and fail 
the test until someone figures out why that blob store does not respect itself.

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

Reply via email to