mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #10681 -- Work around (by ignoring) invalid ETag headers.
This is a hack to work around problems in the Real World. Apparently, Opera 9.64 has been observed sending malformed headers. We now compromise our high principles and simply ignore such bad behaviour. Patch from Ivan Sagalaev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10370 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -112,6 +112,11 @@ class ConditionalGet(TestCase):
|
||||
response = self.client.get('/condition/last_modified2/')
|
||||
self.assertFullResponse(response, check_etag=False)
|
||||
|
||||
def testInvalidETag(self):
|
||||
self.client.defaults['HTTP_IF_NONE_MATCH'] = r'"\"'
|
||||
response = self.client.get('/condition/etag/')
|
||||
self.assertFullResponse(response, check_last_modified=False)
|
||||
|
||||
|
||||
class ETagProcesing(TestCase):
|
||||
def testParsing(self):
|
||||
|
||||
Reference in New Issue
Block a user