jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds] Set Content-MD5 only if ETag has correct format (#493)
Date Wed, 20 Aug 2014 03:49:22 GMT
> @@ -101,9 +102,9 @@ public void endElement(String uri, String name, String qName) {
>        } else if (qName.equals("ETag")) {
>           String currentETag = currentOrNull(currentText);
>           builder.eTag(currentETag);
> -         currentETag = currentETag.replace("\"", "");
> -         if (!MULTIPART_BLOB_ETAG.matcher(currentETag).matches()) {
> -            builder.contentMD5(base16().lowerCase().decode(currentETag));
> +         Matcher matcher = ETAG_CONTENT_MD5_PATTERN.matcher(currentETag);
> +         if (matcher.matches()) {

> Previously this code explicitly rejected multi-part ETag "AAAA-1111"

Ah, OK...it was _kicking out_ multipart ETags! Thanks for explaining.

OK, makes sense!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/493/files#r16457641
Mime
View raw message