Hello community,

here is the log from the commit of package python-urlgrabber for 
openSUSE:Factory checked in at 2014-09-20 15:49:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-urlgrabber (Old)
 and      /work/SRC/openSUSE:Factory/.python-urlgrabber.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-urlgrabber"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-urlgrabber/python-urlgrabber.changes      
2013-02-11 15:09:19.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.python-urlgrabber.new/python-urlgrabber.changes 
2014-09-20 15:49:58.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 16 12:38:07 UTC 2014 - [email protected]
+
+- Add python-urlgrabber-3.9.1-preserve-queryparams-in-urls.patch
+  (bnc#896844)
+
+-------------------------------------------------------------------

New:
----
  python-urlgrabber-3.9.1-preserve-queryparams-in-urls.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-urlgrabber.spec ++++++
--- /var/tmp/diff_new_pack.QPQYE7/_old  2014-09-20 15:49:58.000000000 +0200
+++ /var/tmp/diff_new_pack.QPQYE7/_new  2014-09-20 15:49:58.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-urlgrabber
 #
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,8 @@
 Group:          Development/Languages/Python
 Source:         
http://pypi.python.org/packages/source/u/urlgrabber/urlgrabber-%{version}.tar.gz
 Patch0:         grabber_fix.diff
+# PATCH-FIX-UPSTREAM bnc#896844
+Patch1:         python-urlgrabber-3.9.1-preserve-queryparams-in-urls.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  python-devel
 BuildRequires:  python-pycurl
@@ -46,6 +48,7 @@
 %setup -q -n urlgrabber-%{version}
 sed -i "13d" urlgrabber/__init__.py # Remove wrong license header, fixes 
bnc#781323
 %patch0 -p1
+%patch1 -p1
 
 %build
 python setup.py build

++++++ python-urlgrabber-3.9.1-preserve-queryparams-in-urls.patch ++++++
diff --unified -u -r urlgrabber-3.9.1.orig/urlgrabber/mirror.py 
urlgrabber-3.9.1/urlgrabber/mirror.py
--- urlgrabber-3.9.1.orig/urlgrabber/mirror.py  2014-09-16 14:44:54.582048746 
+0200
+++ urlgrabber-3.9.1/urlgrabber/mirror.py       2014-09-16 14:49:24.138034099 
+0200
@@ -88,6 +88,7 @@
 
 
 import random
+import urlparse
 import thread  # needed for locking to make this threadsafe
 
 from grabber import URLGrabError, CallbackObject, DEBUG
@@ -366,11 +367,12 @@
     # by overriding the configuration methods :)
 
     def _join_url(self, base_url, rel_url):
-        if base_url.endswith('/') or rel_url.startswith('/'):
-            return base_url + rel_url
+        (scheme, netloc, path, query, fragid) = urlparse.urlsplit(base_url)
+        if path.endswith('/') or rel_url.startswith('/'):
+            return urlparse.urlunsplit((scheme, netloc, path + rel_url, query, 
fragid))
         else:
-            return base_url + '/' + rel_url
-        
+            return urlparse.urlunsplit((scheme, netloc, path + '/' + rel_url, 
query, fragid))
+
     def _mirror_try(self, func, url, kw):
         gr = GrabRequest()
         gr.func = func
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to