Revision bfa0341f snf-pithos-app/pithos/api/util.py
b/snf-pithos-app/pithos/api/util.py | ||
---|---|---|
438 | 438 |
def validate_matching_preconditions(request, meta): |
439 | 439 |
"""Check that the ETag conforms with the preconditions set.""" |
440 | 440 |
|
441 |
etag = meta['hash'] if not UPDATE_MD5 else meta['checksum'] |
|
442 |
if not etag: |
|
443 |
etag = None |
|
441 |
etag = meta.get('hash') if not UPDATE_MD5 else meta.get('checksum') |
|
444 | 442 |
|
445 | 443 |
if_match = request.META.get('HTTP_IF_MATCH') |
446 | 444 |
if if_match is not None: |
Also available in: Unified diff