From ddada2d7503a5506fb28db8e60890d54f4568317 Mon Sep 17 00:00:00 2001 From: Cory Benfield Date: Tue, 9 May 2017 10:08:06 +0100 Subject: [PATCH] We no longer downcase some hosts. --- HISTORY.rst | 2 ++ tests/test_requests.py | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index de52852a..5967984a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -25,6 +25,8 @@ Release History on Windows with Python 2.7. - Changed the proxy bypass implementation on Windows: the proxy bypass check doesn't use forward and reverse DNS requests anymore +- URLs with schemes that begin with ``http`` but are not ``http`` or ``https`` + no longer have their host parts forced to lowercase. **Bugfixes** diff --git a/tests/test_requests.py b/tests/test_requests.py index d2b646dc..0dad423c 100755 --- a/tests/test_requests.py +++ b/tests/test_requests.py @@ -2308,12 +2308,12 @@ class TestPreparingURLs(object): 'input, expected', ( ( - b"http+unix://%2Fvar%2Frun%2Fsocket/path", - u"http+unix://%2fvar%2frun%2fsocket/path", + b"http+unix://%2Fvar%2Frun%2Fsocket/path%7E", + u"http+unix://%2Fvar%2Frun%2Fsocket/path~", ), ( - u"http+unix://%2Fvar%2Frun%2Fsocket/path", - u"http+unix://%2fvar%2frun%2fsocket/path", + u"http+unix://%2Fvar%2Frun%2Fsocket/path%7E", + u"http+unix://%2Fvar%2Frun%2Fsocket/path~", ), ( b"mailto:user@example.org", @@ -2346,12 +2346,12 @@ class TestPreparingURLs(object): ( b"http+unix://%2Fvar%2Frun%2Fsocket/path", {"key": "value"}, - u"http+unix://%2fvar%2frun%2fsocket/path?key=value", + u"http+unix://%2Fvar%2Frun%2Fsocket/path?key=value", ), ( u"http+unix://%2Fvar%2Frun%2Fsocket/path", {"key": "value"}, - u"http+unix://%2fvar%2frun%2fsocket/path?key=value", + u"http+unix://%2Fvar%2Frun%2Fsocket/path?key=value", ), ( b"mailto:user@example.org",