Ticket #2504: gzip.diff
File gzip.diff, 660 bytes (added by , 17 years ago) |
---|
-
django/middleware/gzip.py
11 11 on the Accept-Encoding header. 12 12 """ 13 13 def process_response(self, request, response): 14 if response.status_code != 200 or len(response.content) < 200: 14 content_length = response.get_content_length() 15 if response.status_code != 200 or (content_length and content_length < 200): 15 16 # Not worth compressing really short responses or 304 status 16 17 # responses, etc. 17 18 return response