-
-
Notifications
You must be signed in to change notification settings - Fork 32k
urllib.parse doesn't fully comply to RFC 3986 #78541
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
Comments
Since bpo-29651, the urllib.parse docs say:
However, when there are at least one [ and ], but they don't match, there's somewhat inconsistent behavior: >>> urllib.parse.urlparse('http://[::1]]').hostname
'::1'
>>> urllib.parse.urlparse('http://[[::1]').hostname
'[::1' |
I confirm violation of https://tools.ietf.org/html/rfc3986#section-3.2.2 . URLs are now covered by RFC 3986 which obsoletes RFC 1808 that `urllib's documentation refers to. This new URL RFC adds [] to 'reserved' characters, so them being present unquoted anywhere where reserved characters are not allowed shall be a parsing error. |
Looks like this has been fixed:
cc (and thanks!) @sethmlarson @ZeroIntensity |
I'm going to close this one then as |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: