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

Should file://example%/ fail? #36970

Closed
Gallaecio opened this issue Nov 15, 2022 · 1 comment
Closed

Should file://example%/ fail? #36970

Gallaecio opened this issue Nov 15, 2022 · 1 comment

Comments

@Gallaecio
Copy link

Gallaecio commented Nov 15, 2022

I have written a Python implementation of the URL living standard, and I am now aiming to test it against urltestdata.json.

I have found a test case which I suspect is out of date with regards to the URL living standard:

{
"input": "file://example%/",
"base": "about:blank",
"failure": true
},

I believe this input is not supposed to cause a failure since this change in the URL living standard, which, if I am understanding the wording correctly, made it so that host parsing for the file schema is done with isNotSpecial=true, meaning the host here no longer needs to be a valid domain name (which does not support %), but a valid host name (which does support %).

Some other test cases seem to be in a similar situation, such as a few of these:

{
"input": "file://%43%3A",
"base": "about:blank",
"failure": true
},
{
"input": "file://%43%7C",
"base": "about:blank",
"failure": true
},
{
"input": "file://%43|",
"base": "about:blank",
"failure": true
},
{
"input": "file://C%7C",
"base": "about:blank",
"failure": true
},
{
"input": "file://%43%7C/",
"base": "about:blank",
"failure": true
},
{
"input": "https://%43%7C/",
"base": "about:blank",
"failure": true
},
{
"input": "asdf://%43|/",
"base": "about:blank",
"failure": true
},

"Empty host after the domain to ASCII",
{
"input": "file://\u00ad/p",
"base": "about:blank",
"failure": true
},
{
"input": "file://%C2%AD/p",
"base": "about:blank",
"failure": true
},
{
"input": "file://xn--/p",
"base": "about:blank",
"failure": true
},

@Gallaecio
Copy link
Author

I think I have misunderstood the standard. When it says “with url is not special”, it must mean “with the isNotSpecial parameter set to the value of url’s isNotSpecial attribute”.

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

1 participant