From 5a7ec361f4bf093e251d4953bcf6a432717cf690 Mon Sep 17 00:00:00 2001 From: Jeremy Selier Date: Tue, 2 Aug 2011 18:51:21 +0300 Subject: [PATCH] Join with the latest URL not the first one. --- requests/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requests/models.py b/requests/models.py index 55a6a48..5195431 100644 --- a/requests/models.py +++ b/requests/models.py @@ -197,7 +197,7 @@ class Request(object): # Facilitate non-RFC2616-compliant 'location' headers # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource') - url = urljoin(self.url, url) + url = urljoin(r.url, url) # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4 if r.status_code is 303: -- 2.7.4