mirror of
https://github.com/django/django.git
synced 2025-10-21 07:42:25 +00:00
Fixed #17552 -- Removed a hack for IE6 and earlier.
It prevented the GZipMiddleware from compressing some data types even on more recent version of IE where the corresponding bug was fixed. Thanks Aaron Cannon for the report and Tim Graham for the review.
This commit is contained in:
parent
fea8ccdcc4
commit
df09d85482
4 changed files with 6 additions and 22 deletions
|
@ -613,16 +613,6 @@ class GZipMiddlewareTest(TestCase):
|
|||
self.assertEqual(r.content, self.compressible_string)
|
||||
self.assertEqual(r.get('Content-Encoding'), 'deflate')
|
||||
|
||||
def test_no_compress_ie_js_requests(self):
|
||||
"""
|
||||
Tests that compression isn't performed on JavaScript requests from Internet Explorer.
|
||||
"""
|
||||
self.req.META['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 5.00; Windows 98)'
|
||||
self.resp['Content-Type'] = 'application/javascript; charset=UTF-8'
|
||||
r = GZipMiddleware().process_response(self.req, self.resp)
|
||||
self.assertEqual(r.content, self.compressible_string)
|
||||
self.assertEqual(r.get('Content-Encoding'), None)
|
||||
|
||||
def test_no_compress_uncompressible_response(self):
|
||||
"""
|
||||
Tests that compression isn't performed on responses with uncompressible content.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue