diff options
Diffstat (limited to 'django')
| -rw-r--r-- | django/views/decorators/http.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/django/views/decorators/http.py b/django/views/decorators/http.py index a0d02bc8bb..b51cf9a782 100644 --- a/django/views/decorators/http.py +++ b/django/views/decorators/http.py @@ -75,7 +75,15 @@ def condition(etag_func=None, last_modified_func=None): if if_none_match or if_match: # There can be more than one ETag in the request, so we # consider the list of values. - etags = parse_etags(if_none_match or if_match) + try: + etags = parse_etags(if_none_match or if_match) + except ValueError: + # In case of invalid etag ignore all ETag headers. + # Apparently Opera sends invalidly quoted headers at times + # (we should be returning a 400 response, but that's a + # little extreme) -- this is Django bug #10681. + if_none_match = None + if_match = None # Compute values (if any) for the requested resource. if etag_func: |
