mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #26024 -- Fixed regression in ConditionalGetMiddleware ETag support.
Thanks Denis Cornehl for help with the patch.
This commit is contained in:
parent
d5b90c8e12
commit
186b6c61bf
6 changed files with 21 additions and 7 deletions
|
@ -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'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue