Skip to content
Myr

Merge branch 'patch-1' of https://github.com/jeremys/requests into develop

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parents e4adef5, 5a7ec36 · Browse files · 1 file+2 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−4 removed

  • other:+2 added−4 removed

1 file+2 added−4 removed

modified:requests/models.py+2 added-4 removed
10 unmodified lines
11import socket12import zlib1314from urllib2 import HTTPError15from urlparse import urlparse, urlunparse15from urlparse import urlparse, urlunparse, urljoin16from datetime import datetime1718from .config import settings19from .monkeys import Request as _Request, HTTPBasicAuthHandler, HTTPForcedBasicAuthHandler, HTTPDigestAuthHandler, HTTPRedirectHandler
176 unmodified lines
196 url = r.headers['location']197198 # Facilitate non-RFC2616-compliant 'location' headers199 # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')200 if not urlparse(url).netloc:201 parent_url_components = urlparse(self.url)202 url = '%s://%s/%s' % (parent_url_components.scheme, parent_url_components.netloc, url)200 url = urljoin(r.url, url)201202 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4203 if r.status_code is 303:204 method = 'GET'
360 unmodified lines