﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3052	gzip middleware bug	simonbun <simonbun@…>	Adrian Holovaty	"The current gzip middleware forgets to update the response's Content-Length and so the uncompressed size is wrongly returned.

This caused my apache connection to remain open after the last files had transfered, untill it timed out. Standard setting for this timeout is 15 seconds, so it can be quite annoying. The page appears to keep on loading, even though all content has loaded correctly.

Here is the small patch:

{{{
--- gzip.py	(revision 4088)
+++ gzip.py	(working copy)
@@ -25,4 +25,5 @@
 
         response.content = compress_string(response.content)
         response['Content-Encoding'] = 'gzip'
+        response['Content-Length'] = str(len(response.content))
         return response
}}}
"	defect	closed	Core (Other)		minor	fixed			Unreviewed	0	0	0	0	0	0
