From 5bafb499e7647bb0829d566538c1c8d621bdee0f Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Wed, 22 Nov 2006 20:31:09 +0000 Subject: [PATCH] Fixed #3052: GZIP middleware now correctly reports Content-Length. Thanks, simonbun. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4089 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/middleware/gzip.py | 1 + 1 file changed, 1 insertion(+) diff --git a/django/middleware/gzip.py b/django/middleware/gzip.py index 7d860abdb1..a7c74481d0 100644 --- a/django/middleware/gzip.py +++ b/django/middleware/gzip.py @@ -25,4 +25,5 @@ class GZipMiddleware(object): response.content = compress_string(response.content) response['Content-Encoding'] = 'gzip' + response['Content-Length'] = str(len(response.content)) return response