diff --git a/python-urlgrabber.spec b/python-urlgrabber.spec index f11df81..592872e 100644 --- a/python-urlgrabber.spec +++ b/python-urlgrabber.spec @@ -6,7 +6,6 @@ Version: 3.9.1 Release: 5%{?dist} Source0: urlgrabber-%{version}.tar.gz Patch1: urlgrabber-HEAD.patch -Patch2: urlgrabber-reset.patch License: LGPLv2+ Group: Development/Libraries @@ -25,7 +24,6 @@ authentication, proxies and more. %prep %setup -q -n urlgrabber-%{version} %patch1 -p1 -%patch2 -p1 %build python setup.py build @@ -45,8 +43,9 @@ rm -rf $RPM_BUILD_ROOT %{_bindir}/urlgrabber %changelog -* Fri Feb 19 2010 Seth Vidal - 3.9.1-5 -- add patch to allow reset_curl_obj() to close and reload the cached curl obj +* Tue Apr 13 2010 James Antill 3.9.1-5 +- Update to upstream HEAD. +- LOWSPEEDLIMIT and hdrs * Thu Nov 12 2009 Seth Vidal - 3.9.1-4 - reset header values when we redirect and make sure debug output will work diff --git a/urlgrabber-HEAD.patch b/urlgrabber-HEAD.patch index 90180d2..d2c6486 100644 --- a/urlgrabber-HEAD.patch +++ b/urlgrabber-HEAD.patch @@ -140,3 +140,43 @@ index dd07c6a..45eb248 100644 else: seconds = int(seconds) minutes = seconds / 60 +commit e85f27c43f991469db38bad97735ce2c0f7d075d +Author: Seth Vidal +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 +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':