[Python-checkins] r85186 - tracker/instances/python-dev/rietveld/gae2django.diff

martin.v.loewis python-checkins at python.org
Sat Oct 2 20:27:56 CEST 2010


Author: martin.v.loewis
Date: Sat Oct  2 20:27:56 2010
New Revision: 85186

Log:
Fix urlfetch redirect bug.


Added:
   tracker/instances/python-dev/rietveld/gae2django.diff   (contents, props changed)

Added: tracker/instances/python-dev/rietveld/gae2django.diff
==============================================================================
--- (empty file)
+++ tracker/instances/python-dev/rietveld/gae2django.diff	Sat Oct  2 20:27:56 2010
@@ -0,0 +1,18 @@
+Index: gaeapi/appengine/api/urlfetch.py
+===================================================================
+--- gaeapi/appengine/api/urlfetch.py	(Revision 134)
++++ gaeapi/appengine/api/urlfetch.py	(Arbeitskopie)
+@@ -76,10 +76,11 @@
+                 connection.close()
+ 
+             if http_response.status in REDIRECT_STATUSES:
+-                url = http_response.getheader('Location', None)
+-                if url is None:
++                newurl = http_response.getheader('Location', None)
++                if newurl is None:
+                     raise DownloadError('Redirect is missing Location header.')
+                 else:
++                    url = urlparse.urljoin(url, newurl)
+                     method = 'GET'
+             else:
+                 response = Response()


More information about the Python-checkins mailing list