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

Parsing the hostname "xn--" returns an empty hostname, but doesn't throw an error when a hostname is required #373

Closed
MJDSys opened this issue Jul 3, 2017 · 2 comments

Comments

@MJDSys
Copy link

MJDSys commented Jul 3, 2017

Basically, assert_eq!(Url::parse("ftp://xn--"), Url::parse("ftp:///")); fails. It seems even though idna parsing produces an empty host, it's still not considered empty and a valid Url is constructed instead of returning an error.

Is this the expected behaviour? Or should the empty host check not take into account idna processing.

behnam added a commit to behnam/rust-url that referenced this issue Jul 3, 2017
Helps with answering question asked in
servo#373
behnam added a commit to behnam/rust-url that referenced this issue Jul 3, 2017
Helps with answering question asked in
servo#373

The test invariants here are based on and checked against:

* Processing Step 4 of UTS#46
  (<http://www.unicode.org/reports/tr46/#ProcessingStepPunycode>)

* 6.2 Decoding procedure of Punycode RFC.
  (<https://ietf.org/rfc/rfc3492.txt>)
@rmisev
Copy link

rmisev commented May 7, 2020

It was URL spec issue. Now fixed in whatwg/url#497

@djc
Copy link
Contributor

djc commented Aug 25, 2020

This should be fixed by 6b05499.

@djc djc closed this as completed Aug 25, 2020
djc pushed a commit that referenced this issue Aug 25, 2020
Helps with answering question asked in
#373

The test invariants here are based on and checked against:

* Processing Step 4 of UTS#46
  (<http://www.unicode.org/reports/tr46/#ProcessingStepPunycode>)

* 6.2 Decoding procedure of Punycode RFC.
  (<https://ietf.org/rfc/rfc3492.txt>)
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

3 participants