Consistently compare quoted ETags in CopyBlob

This commit is contained in:
Andrew Gaul 2016-05-28 12:17:28 -07:00
parent 00a36c3e45
commit fb186d82de
1 changed files with 2 additions and 2 deletions

View File

@ -266,10 +266,10 @@ public abstract class BaseBlobStore implements BlobStore {
String eTag = blob.getMetadata().getETag();
if (eTag != null) {
eTag = maybeQuoteETag(eTag);
if (options.ifMatch() != null && !options.ifMatch().equals(eTag)) {
if (options.ifMatch() != null && !maybeQuoteETag(options.ifMatch()).equals(eTag)) {
throw returnResponseException(412);
}
if (options.ifNoneMatch() != null && options.ifNoneMatch().equals(eTag)) {
if (options.ifNoneMatch() != null && maybeQuoteETag(options.ifNoneMatch()).equals(eTag)) {
throw returnResponseException(412);
}
}