Skip to content
Myr

Merge branch 'urlencode' into develop

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

authored by Jérémy Bethmont · committed by Jérémy Bethmont · parents 32a861b, 7b79cea · Browse files · 1 file+2 added−3 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−3 removed

  • other:+2 added−3 removed

1 file+2 added−3 removed

modified:requests/models.py+2 added-3 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
178 unmodified lines
198199 # Facilitate non-RFC2616-compliant 'location' headers200 # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource')201 if not urlparse(url).netloc:202 parent_url_components = urlparse(self.url)203 url = '%s://%s/%s' % (parent_url_components.scheme, parent_url_components.netloc, urllib.quote(urllib.unquote(url)))202 url = urljoin(r.url, urllib.quote(urllib.unquote(url)))203204 # http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4205 if r.status_code is 303:206 method = 'GET'
368 unmodified lines