-
Notifications
You must be signed in to change notification settings - Fork 336
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
Panic on setting hostname for non-spec:/.//p
URL
#700
Comments
Sure. I see there are no fixes yet. I'll work on the issue. |
This would need clarification based on the URL specification. Reason being that, typically double slashes are not allowed if the URL does not contain an authority component. However, the same on entry is still allowed in browsers. The clarification that is needed is how the rust-url should parse this. Should it remove any double slashes it encounters, effectively making:
or should it retain a single slash, like eg. |
The main issue is that the invariants were not kept. According to the URL Standard, the leading This is what #817 did, so I think this issue is now solved. |
To be more explicit, adding the test case below to {
"href": "non-spec:/.//p",
"new_value": "",
"expected": {
"href": "non-spec:/.//p",
"host": "",
"hostname": "",
"pathname": "//p"
}
} |
Fixed by #817 |
While trying to investigate servo/servo#28386, I found this test case for
hostname
setter will crash in ServoI can reproduce this issue in
rust-url
with adding this test case to theurl/tests/setters_tests.json
in thehostname
section.The text was updated successfully, but these errors were encountered: