1
0
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:
Denis Cornehl
2016-01-05 08:09:10 +01:00
committed by Tim Graham
parent d5b90c8e12
commit 186b6c61bf
6 changed files with 21 additions and 7 deletions

View File

@@ -158,8 +158,10 @@ class ETagProcessingTests(unittest.TestCase):
self.assertEqual(etags, ['', 'etag', 'e"t"ag', r'e\tag', 'weak'])
def test_quoting(self):
quoted_etag = http.quote_etag(r'e\t"ag')
original_etag = r'e\t"ag'
quoted_etag = http.quote_etag(original_etag)
self.assertEqual(quoted_etag, r'"e\\t\"ag"')
self.assertEqual(http.unquote_etag(quoted_etag), original_etag)
class HttpDateProcessingTests(unittest.TestCase):