Changeset 5875
- Timestamp:
- 08/12/07 07:29:25 (1 year ago)
- Files:
-
- django/trunk/django/middleware/gzip.py (modified) (1 diff)
- django/trunk/docs/middleware.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/django/middleware/gzip.py
r4265 r5875 12 12 """ 13 13 def process_response(self, request, response): 14 if response.status_code != 200 or len(response.content) < 200: 15 # Not worth compressing really short responses or 304 status 16 # responses, etc. 17 return response 18 14 19 patch_vary_headers(response, ('Accept-Encoding',)) 15 20 django/trunk/docs/middleware.txt
r5670 r5875 92 92 browsers). 93 93 94 It is suggested to place this first in the middleware list, so that the 95 compression of the response content is the last thing that happens. Will not 96 compress content bodies less than 200 bytes long, when the response code is 97 something other than 200, Javascript files (for IE compatibitility), or 98 responses that have the ``Content-Encoding`` header already specified. 99 94 100 django.middleware.http.ConditionalGetMiddleware 95 101 -----------------------------------------------
