- Update to upstream HEAD.

- LOWSPEEDLIMIT and hdrs
epel9
James Antill 15 years ago
parent c3eb320495
commit ce8535ddf5

@ -6,7 +6,6 @@ Version: 3.9.1
Release: 5%{?dist} Release: 5%{?dist}
Source0: urlgrabber-%{version}.tar.gz Source0: urlgrabber-%{version}.tar.gz
Patch1: urlgrabber-HEAD.patch Patch1: urlgrabber-HEAD.patch
Patch2: urlgrabber-reset.patch
License: LGPLv2+ License: LGPLv2+
Group: Development/Libraries Group: Development/Libraries
@ -25,7 +24,6 @@ authentication, proxies and more.
%prep %prep
%setup -q -n urlgrabber-%{version} %setup -q -n urlgrabber-%{version}
%patch1 -p1 %patch1 -p1
%patch2 -p1
%build %build
python setup.py build python setup.py build
@ -45,8 +43,9 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/urlgrabber %{_bindir}/urlgrabber
%changelog %changelog
* Fri Feb 19 2010 Seth Vidal <skvidal at fedoraproject.org> - 3.9.1-5 * Tue Apr 13 2010 James Antill <james@fedoraproject.org> 3.9.1-5
- add patch to allow reset_curl_obj() to close and reload the cached curl obj - Update to upstream HEAD.
- LOWSPEEDLIMIT and hdrs
* Thu Nov 12 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.9.1-4 * Thu Nov 12 2009 Seth Vidal <skvidal at fedoraproject.org> - 3.9.1-4
- reset header values when we redirect and make sure debug output will work - reset header values when we redirect and make sure debug output will work

@ -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':

Loading…
Cancel
Save