Skip to content
Myr

Revert "Merge pull request #1710 from jvantuyl/master"

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

This reverts commit a8300c0ae6dd7e6b1655cf80b349e0bf645ff694, reversing changes made to 2e196be143035fa6d03743d6ca95a2904572f12a.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent a8300c0 · Browse files · 3 files+0 added−15 removed
This commit

State

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

Diff stats

3 files+0 added−15 removed

  • other:+0 added−15 removed

3 files+0 added−15 removed

modified:requests/packages/urllib3/util.py-2 removed
363 unmodified lines
364365 # Scheme366 if '://' in url:367 scheme, url = url.split('://', 1)368 elif ':' in url:369 scheme, url = url.split(':', 1)368369 # Find the earliest Authority Terminator370 # (http://tools.ietf.org/html/rfc3986#section-3.2)371 url, path_, delim = split_first(url, ['/', '?', '#'])
264 unmodified lines
modified:requests/models.py-5 removed
325 unmodified lines
326 if not scheme:327 raise MissingSchema("Invalid URL {0!r}: No schema supplied. "328 "Perhaps you meant http://{0}?".format(url))329330 # Don't do any URL preparation for oddball schemes331 if scheme.lower() not in ('http', 'https'):332 self.url = url333 return334330 if not host:331 raise InvalidURL("Invalid URL %r: No host supplied" % url)332333 # Only want to apply IDNA to the hostname
401 unmodified lines
modified:test_requests.py-8 removed
676 unmodified lines
677 p = req.prepare()678679 assert p.headers['Content-Length'] == length680681 def test_oddball_schemes_dont_check_URLs(self):682 r1 = requests.Request('GET', 'data:image/gif;base64,R0lGODlhAQABAHAAACH5BAUAAAAALAAAAAABAAEAAAICRAEAOw==')683 r1.prepare()684 r2 = requests.Request('GET', 'file:///etc/passwd')685 r2.prepare()686 r3 = requests.Request('GET', 'magnet:?xt=urn:btih:be08f00302bc2d1d3cfa3af02024fa647a271431')687 r3.prepare()688681class TestContentEncodingDetection(unittest.TestCase):682683 def test_none(self):684 encodings = requests.utils.get_encodings_from_content('')
201 unmodified lines