mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #23695 -- Made condition decorator work for HEAD requests without ETag.
This commit is contained in:
committed by
Tim Graham
parent
0e16c3e3cd
commit
9f1202c166
@@ -124,6 +124,11 @@ class ConditionalGet(TestCase):
|
||||
response = self.client.get('/condition/last_modified2/')
|
||||
self.assertFullResponse(response, check_etag=False)
|
||||
|
||||
def test_single_condition_head(self):
|
||||
self.client.defaults['HTTP_IF_MODIFIED_SINCE'] = LAST_MODIFIED_STR
|
||||
response = self.client.head('/condition/')
|
||||
self.assertNotModified(response)
|
||||
|
||||
def test_invalid_etag(self):
|
||||
self.client.defaults['HTTP_IF_NONE_MATCH'] = r'"\"'
|
||||
response = self.client.get('/condition/etag/')
|
||||
|
||||
Reference in New Issue
Block a user