[Zope-Checkins] CVS: Zope2 - Image.py:1.128.6.4

Martijn Pieters mj@digicool.com
Fri, 20 Apr 2001 11:03:52 -0400 (EDT)


Update of /cvs-repository/Zope2/lib/python/OFS
In directory korak:/tmp/cvs-serv16139/lib/python/OFS

Modified Files:
      Tag: mj-http_range_support-branch
	Image.py 
Log Message:
Added a few more 'Accept-Ranges' headers to File object responses.



--- Updated File Image.py in package Zope2 --
--- Image.py	2001/04/19 00:01:45	1.128.6.3
+++ Image.py	2001/04/20 15:03:52	1.128.6.4
@@ -384,6 +384,7 @@
                 if not satisfiable:
                     RESPONSE.setHeader('Content-Range', 
                         'bytes */%d' % self.size)
+                    RESPONSE.setHeader('Accept-Ranges', 'bytes')
                     RESPONSE.setHeader('Last-Modified',
                         rfc1123_date(self._p_mtime))
                     RESPONSE.setHeader('Content-Type', self.content_type)
@@ -403,6 +404,7 @@
                         rfc1123_date(self._p_mtime))
                     RESPONSE.setHeader('Content-Type', self.content_type)
                     RESPONSE.setHeader('Content-Length', size)
+                    RESPONSE.setHeader('Accept-Ranges', 'bytes')
                     RESPONSE.setHeader('Content-Range', 
                         'bytes %d-%d/%d' % (start, end - 1, self.size))
                     RESPONSE.setStatus(206) # Partial content
@@ -457,6 +459,7 @@
                             
                     
                     RESPONSE.setHeader('Content-Length', size)
+                    RESPONSE.setHeader('Accept-Ranges', 'bytes')
                     RESPONSE.setHeader('Last-Modified',
                         rfc1123_date(self._p_mtime))
                     RESPONSE.setHeader('Content-Type',