[Checkins] SVN: zope.publisher/trunk/src/zope/publisher/http.py Fix
caching issue. The input stream get never cached in a temp file
Roger Ineichen
roger at projekt01.ch
Sat Jun 2 22:54:16 EDT 2007
Log message for revision 76188:
Fix caching issue. The input stream get never cached in a temp file
because of a wrong content length header lookup. Added CONTENT_LENGTH
header check additional to the previous used HTTP_CONTENT_LENGTH. The
HTTP_ prefix is sometimes added by some CGI proxies but CONTENT_LENGTH
is the right header info which should know the size
Changed:
U zope.publisher/trunk/src/zope/publisher/http.py
-=-
Modified: zope.publisher/trunk/src/zope/publisher/http.py
===================================================================
--- zope.publisher/trunk/src/zope/publisher/http.py 2007-06-03 02:52:55 UTC (rev 76187)
+++ zope.publisher/trunk/src/zope/publisher/http.py 2007-06-03 02:54:16 UTC (rev 76188)
@@ -191,7 +191,9 @@
def __init__(self, stream, environment):
self.stream = stream
- size = environment.get('HTTP_CONTENT_LENGTH')
+ size = environment.get('CONTENT_LENGTH')
+ if size is None:
+ size = environment.get('HTTP_CONTENT_LENGTH')
if size is None or int(size) < 65536:
self.cacheStream = StringIO()
else:
More information about the Checkins
mailing list