Skip to content
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

normalisation of urls containing non-ascii domains is broken and loses data #23

Open
wbolster opened this issue Jan 15, 2016 · 4 comments
Assignees
Milestone

Comments

@wbolster
Copy link

Initial parsing works:

>>> rfc3986.uri_reference('http://æåëý.com/path?query#fragment')
URIReference(scheme='http', authority='æåëý.com', path='/path', query='query', fragment='fragment')

Subsequent normalisation silently loses data:

>>> rfc3986.uri_reference('http://æåëý.com/path?query#fragment').normalize()
URIReference(scheme='http', authority=None, path='/path', query='query', fragment='fragment')
@sigmavirus24
Copy link
Collaborator

Correct. We do not yet handle IRIs. (RFC 3987)

@wbolster
Copy link
Author

Fwiw, preprocessing by replacing the host name part with its IDNA-encoded (xn--…) equivalent using the url parsing routines from the urllib3 package, before passing it to uri_reference() sort of "works" as a work-around.

@pombredanne
Copy link

Correct. We do not yet handle IRIs. (RFC 3987)

@sigmavirus24 the doc also state the same "There's presently no support for IRIs as defined in RFC 3987." .... but is this correct? I can see some IRI support in the code proper.

@sigmavirus24
Copy link
Collaborator

@pombredanne yes there was some IRI support. I've been away from this library long enough to need to dig in and figure out whether this issue is still valid. Unfortunately I have almost zero time for these projects these days

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

4 participants