mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #26024 -- Fixed regression in ConditionalGetMiddleware ETag support.
Thanks Denis Cornehl for help with the patch.
This commit is contained in:
committed by
Tim Graham
parent
d5b90c8e12
commit
186b6c61bf
@@ -470,6 +470,11 @@ class ConditionalGetMiddlewareTest(SimpleTestCase):
|
||||
self.resp = ConditionalGetMiddleware().process_response(self.req, self.resp)
|
||||
self.assertEqual(self.resp.status_code, 304)
|
||||
|
||||
def test_if_none_match_and_same_etag_with_quotes(self):
|
||||
self.req.META['HTTP_IF_NONE_MATCH'] = self.resp['ETag'] = '"spam"'
|
||||
self.resp = ConditionalGetMiddleware().process_response(self.req, self.resp)
|
||||
self.assertEqual(self.resp.status_code, 304)
|
||||
|
||||
def test_if_none_match_and_different_etag(self):
|
||||
self.req.META['HTTP_IF_NONE_MATCH'] = 'spam'
|
||||
self.resp['ETag'] = 'eggs'
|
||||
|
||||
Reference in New Issue
Block a user