-
-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support uppercase characters in host #1441
Comments
We do lowercase the host after the validation so its an order problem. |
This is a regression introduced in #954 |
#1442 will fix this. Unfortunately we cannot do a release right now due to pypa/gh-action-pypi-publish#307 |
It looks like whatever problem that was slowing down the uploads enough to fail has been resolved as |
1.18.3 publishing now. 🤞 that the upload problem doesn't bite us https://github.com/aio-libs/yarl/actions/runs/12108501591 |
1.18.3 now available with the fix |
Please confirm the following
vulnerability, to the best of my knowledge. (These must be shared by
submitting this report form instead, if
any hesitation exists.)
Describe the bug
When using uppercase characters in the hostname they get reported as invalid:
It appears to me, that there needs to be a conversion into lowercase, for example the
host
-property says it gets converted to lowercase (which is the case when using__init__()
) and the comment atNOT_REG_NAME
mentions that it only accepts lowercase ASCII values:When using a non-ASCII string with host, it gets encoded so it seems weird that ASCII uppercase strings aren't "encoded" into lowercase. There is #386, but there it is using
__init__()
which works correctly.To Reproduce
yarl.URL.build(scheme="http", host="A", port=port, path="/")
Expected behavior
A valid URL which is identical to the build URL using the lowercase host.
Logs/tracebacks
Python Version
multidict Version
propcache Version
yarl Version
OS
Windows 10
Additional context
No response
The text was updated successfully, but these errors were encountered: