-
Notifications
You must be signed in to change notification settings - Fork 334
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
Joining relative path onto a file:// url with a hostname is non spec compliant #504
Comments
Consider including the version numbers of all tools involved when testing. Note that some Firefox versions actually use rust-url for some things. Also, the title of the issue mentions spec compliance but the description does not point to specification text at all, only the behavior of a specific implementation. |
@SimonSapin W.r.t. referencing the spec: the whatwg url parsing spec is described as a state machine which makes it difficult to point at a specific "rule". https://github.com/web-platform-tests/wpt/blob/255b99e5c2e0f5f8010adf6b69e3c1e0b73f7652/url/resources/urltestdata.json#L5554-L5556 [
{
"input": "/..//localhost//pig",
"base": "file://lion/",
"href": "file://lion/localhost//pig",
"protocol": "file:",
"username": "",
"password": "",
"host": "lion",
"hostname": "lion",
"port": "",
"pathname": "/localhost//pig",
"search": "",
"hash": ""
},
{
"input": "/rooibos",
"base": "file://tea/",
"href": "file://tea/rooibos",
"protocol": "file:",
"username": "",
"password": "",
"host": "tea",
"hostname": "tea",
"port": "",
"pathname": "/rooibos",
"search": "",
"hash": ""
},
{
"input": "/?chai",
"base": "file://tea/",
"href": "file://tea/?chai",
"protocol": "file:",
"username": "",
"password": "",
"host": "tea",
"hostname": "tea",
"port": "",
"pathname": "/",
"search": "?chai",
"hash": ""
}
] |
@piscisaureus I also updated my comment in #504 (comment). Looks like Safari currently agrees with Firefox. Currently, Firefox, Safari and Servo failed on these 3 tests you mentioned. @SimonSapin what do you think 👀? |
I must admit, it's not as cut-and-dry as I made it sound, |
Current rust-url passes all the tests in web-platform-tests. Is there still something to do here? |
Any remaining work can probably be tackled as part of #642. |
Expected output:
file://server/another/path/at/the/same/server
Actual output
file:///another/path/at/the/same/server
Compare also the output from Firefox developer tools:
The text was updated successfully, but these errors were encountered: