/[straw]/straw/src/lib/URLFetch.py
ViewVC logotype

Diff of /straw/src/lib/URLFetch.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by jmalonzo, Wed Oct 29 10:18:51 2003 UTC revision 1.27 by juri, Fri Oct 31 22:04:04 2003 UTC
# Line 154  class Consumer: Line 154  class Consumer:
154    
155      def http_header(self, status, header):      def http_header(self, status, header):
156          """Called by HTTPConnection_async with status and header"""          """Called by HTTPConnection_async with status and header"""
157          if header.getheader('content-length', '0') == '0':          if header.getheader('content-length') == '0':
158              self.finished_callback()              self.finished_callback()
159    
160      def http_redirect(self, location, permanent = 0):      def http_redirect(self, location, permanent = 0):
# Line 210  class ProxyConsumer(Consumer): Line 210  class ProxyConsumer(Consumer):
210      def feed(self, data):      def feed(self, data):
211          self.data += data          self.data += data
212          datalength = len(self.data)          datalength = len(self.data)
213          if datalength >= int(self.header.getheader('content-length', 0)):          cl = self.header.getheader('content-length')
214            if cl is not None and datalength >= int(cl):
215            #if datalength >= int(self.header.getheader('content-length', 0)):
216              self.connection.close()              self.connection.close()
217              self.finished_callback()              self.finished_callback()
218          elif datalength >= straw.NetworkConstants.MAX_DOWNLOAD_SIZE:          elif datalength >= straw.NetworkConstants.MAX_DOWNLOAD_SIZE:

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26