|
scheme, auth, host, port, path, query, fragment = parse_url(url) |
When passing in a URL with an upper-case letter after a - character the host is coerced to lower case.
Python Version: 3.9.1
Requests Version: 2.26.0
OS: MacOS
Steps to reproduce
from requests.models import PreparedRequest
p = PreparedRequest()
url = "http://service-A/abc"
p.prepare_url(url, None)
print(p.url)
"http://service-a/abc"
Notice how the A has been changed to a. This behavior is not expected. I have also submitted this bug report as the behavior arises from the use of urllib3.
requests/requests/models.py
Line 369 in 916d171
When passing in a URL with an upper-case letter after a
-character the host is coerced to lower case.Python Version: 3.9.1
Requests Version: 2.26.0
OS: MacOS
Steps to reproduce
Notice how the
Ahas been changed toa. This behavior is not expected. I have also submitted this bug report as the behavior arises from the use ofurllib3.