[Zope-Checkins] CVS: Zope/lib/python/OFS - Image.py:1.145.2.7

Casey Duncan casey at zope.com
Thu Apr 29 11:32:14 EDT 2004


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv16230/lib/python/OFS

Modified Files:
      Tag: Zope-2_7-branch
	Image.py 
Log Message:
Remove Content-Length HTTP header from 304 responses which violates RFC 2616. Th
is was a workaround for a (fixed) apache proxy-cache bug. (Issue #544)


=== Zope/lib/python/OFS/Image.py 1.145.2.6 => 1.145.2.7 ===
--- Zope/lib/python/OFS/Image.py:1.145.2.6	Sun Mar 28 06:11:47 2004
+++ Zope/lib/python/OFS/Image.py	Thu Apr 29 11:32:12 2004
@@ -150,12 +150,9 @@
                 else:
                     last_mod = long(0)
                 if last_mod > 0 and last_mod <= mod_since:
-                    # Set header values since apache caching will return
-                    # Content-Length of 0 in response if size is not set here
                     RESPONSE.setHeader('Last-Modified',
                                        rfc1123_date(self._p_mtime))
                     RESPONSE.setHeader('Content-Type', self.content_type)
-                    RESPONSE.setHeader('Content-Length', self.size)
                     RESPONSE.setHeader('Accept-Ranges', 'bytes')
                     RESPONSE.setStatus(304)
                     return True




More information about the Zope-Checkins mailing list