Skip to content

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

Closed
sethmlarson opened this issue Jan 28, 2019 · 5 comments
Closed

Normalize RFC 4007 delimiter for IPv6 Zone IDs #43

sethmlarson opened this issue Jan 28, 2019 · 5 comments
Assignees

Comments

@sethmlarson
Copy link
Member

sethmlarson commented Jan 28, 2019

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.

@sethmlarson sethmlarson self-assigned this Jan 28, 2019
@sigmavirus24
Copy link
Collaborator

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

@sethmlarson
Copy link
Member Author

Sure, I'll change the problem statement to normalize. We don't want to validate these URLs as 3986 compliant.

@sethmlarson sethmlarson changed the title Support RFC 4007 delimiter for IPv6 Zone IDs Normalize RFC 4007 delimiter for IPv6 Zone IDs Jan 28, 2019
@sethmlarson
Copy link
Member Author

sethmlarson commented Jan 29, 2019

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)

@sethmlarson sethmlarson reopened this Jan 29, 2019
@sigmavirus24
Copy link
Collaborator

What is "lazy_normalize"?

@sethmlarson
Copy link
Member Author

sethmlarson commented Jan 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants