[Zope-Checkins] CVS: Zope2 - FTPServer.py:1.18.8.1
Martijn Pieters
mj@digicool.com
Fri, 20 Apr 2001 11:02:28 -0400 (EDT)
Update of /cvs-repository/Zope2/ZServer
In directory korak:/tmp/cvs-serv16042/ZServer
Modified Files:
Tag: mj-http_range_support-branch
FTPServer.py
Log Message:
Added support for restarting FTP downloads of File objects, using the new
Range header support.
(This was so (too?) easy!)
--- Updated File FTPServer.py in package Zope2 --
--- FTPServer.py 2001/04/09 19:24:32 1.18
+++ FTPServer.py 2001/04/20 15:02:28 1.18.8.1
@@ -369,6 +369,9 @@
response=make_response(self, self.retr_completion, line[1])
self._response_producers = response.stdout._producers
request=FTPRequest(line[1],'RETR',self,response)
+ # Support download restarts if possible.
+ if self.restart_position > 0:
+ request.environ['HTTP_RANGE'] = 'bytes=%d-' % self.restart_position
handle(self.module,request,response)
def retr_completion(self, file, response):