-
Notifications
You must be signed in to change notification settings - Fork 32
Normalize RFC 4007 delimiter for IPv6 Zone IDs #43
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
I think we want to support them in-so-much-as being able to normalize to the correct syntax and such, right? I think I'm worried about the "We need to ... accept ... 4007" bit because I'm not sure what acceptance means today |
Sure, I'll change the problem statement to normalize. We don't want to validate these URLs as 3986 compliant. |
Discovered an issue with where we're doing the IPv6 Zone ID validation that makes normalization not work as we want it to. parse_result = rfc3986.ParseResult.from_string("http://[::1%eth0]", lazy_normalize=False)
# This should not error but does currently in master.
rfc3986.validator.Validator().check_validity_of('host').validate(parse_result.referece) |
What is "lazy_normalize"? |
Controls whether the internal uri reference is normalized after parsing. I think what's happening is the authority is getting detected as invalid and is being stripped off before the normalizer gets to see the host to normalize. |
Uh oh!
There was an error while loading. Please reload this page.
RFC 4007 allows
%
as the delimiter for IPv6 zone IDs whereas RFC 6874 specifically uses%25
to comply with the host component rules in RFC 3986. We need to assume 6874 and normalize 4007 -> 6874. See discussion in urllib3/urllib3#1531.The text was updated successfully, but these errors were encountered: