|
|
@ -140,3 +140,43 @@ index dd07c6a..45eb248 100644
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
seconds = int(seconds)
|
|
|
|
seconds = int(seconds)
|
|
|
|
minutes = seconds / 60
|
|
|
|
minutes = seconds / 60
|
|
|
|
|
|
|
|
commit e85f27c43f991469db38bad97735ce2c0f7d075d
|
|
|
|
|
|
|
|
Author: Seth Vidal <skvidal@fedoraproject.org>
|
|
|
|
|
|
|
|
Date: Mon Mar 15 22:50:21 2010 -0400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
make sure we're properly reading the hdrs and returning them
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
|
|
|
|
|
|
|
|
index 16bb1d2..ac5ae18 100644
|
|
|
|
|
|
|
|
--- a/urlgrabber/grabber.py
|
|
|
|
|
|
|
|
+++ b/urlgrabber/grabber.py
|
|
|
|
|
|
|
|
@@ -1135,8 +1135,10 @@ class PyCurlFileObject():
|
|
|
|
|
|
|
|
if self._parsed_hdr:
|
|
|
|
|
|
|
|
return self._parsed_hdr
|
|
|
|
|
|
|
|
statusend = self._hdr_dump.find('\n')
|
|
|
|
|
|
|
|
+ statusend += 1 # ridiculous as it may seem.
|
|
|
|
|
|
|
|
hdrfp = StringIO()
|
|
|
|
|
|
|
|
hdrfp.write(self._hdr_dump[statusend:])
|
|
|
|
|
|
|
|
+ hdrfp.seek(0)
|
|
|
|
|
|
|
|
self._parsed_hdr = mimetools.Message(hdrfp)
|
|
|
|
|
|
|
|
return self._parsed_hdr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
commit 8e57ad3fbf14c55434eab5c04c4e00ba4f5986f9
|
|
|
|
|
|
|
|
Author: James Antill <james@and.org>
|
|
|
|
|
|
|
|
Date: Mon Mar 1 11:48:00 2010 -0500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implement connection established timeout using, LOW_SPEED_LIMIT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/urlgrabber/grabber.py b/urlgrabber/grabber.py
|
|
|
|
|
|
|
|
index e63d4bb..bd4da75 100644
|
|
|
|
|
|
|
|
--- a/urlgrabber/grabber.py
|
|
|
|
|
|
|
|
+++ b/urlgrabber/grabber.py
|
|
|
|
|
|
|
|
@@ -1179,6 +1179,8 @@ class PyCurlFileObject():
|
|
|
|
|
|
|
|
if hasattr(opts, 'timeout'):
|
|
|
|
|
|
|
|
timeout = int(opts.timeout or 0)
|
|
|
|
|
|
|
|
self.curl_obj.setopt(pycurl.CONNECTTIMEOUT, timeout)
|
|
|
|
|
|
|
|
+ self.curl_obj.setopt(pycurl.LOW_SPEED_LIMIT, 1)
|
|
|
|
|
|
|
|
+ self.curl_obj.setopt(pycurl.LOW_SPEED_TIME, timeout)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ssl options
|
|
|
|
|
|
|
|
if self.scheme == 'https':
|
|
|
|