Changes between Initial Version and Version 1 of Ticket #15353
- Timestamp:
- Feb 20, 2011, 6:00:36 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #15353
- Property Resolution → worksforme
- Property Status new → closed
-
Ticket #15353 – Description
initial v1 1 1 In django.middleware.gzip.GZipMiddleware have a bug: 2 2 {{{ 3 3 def process_response(self, request, response): 4 4 # It's not worth compressing non-OK or really short responses. 5 5 if response.status_code != 200 or len(response.content) < 200: 6 6 return response 7 7 }}} 8 8 exist response without response.content! 9 9 10 10 when I use: (in url.py ) 11 {{{ 11 12 (r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), 12 13 }}} 13 14 to binary files have a problem, do not exist response.content. 14 15 {{{ 15 16 to solver the bug I add 'try' on code: 16 17 try: … … 19 20 except: 20 21 return response 21 22 }}} 22 23 In my vision the middlewere gzip don't have compress binary, because the browser is incompatible 23 24