-
Notifications
You must be signed in to change notification settings - Fork 344
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
URL with username/password removed creates invalid URL with .to_string() #796
Comments
Same applies to |
There's a difference between |
From the URL Standard, in URL serializing:
The first link of the quote leads to:
So I think the This is consistent with normalization, as seen in However, the standard also says: Note that the standard does make the distinction between “null” and “empty-string”. So I think This is consistent with examples of normalization in |
When setting username/password to empty string value,
:
and@
chars should be removed from the URL when usingto_string()
.Steps to reproduce:
String
URL with username and password:https://username:[email protected]
.Url::parse()
from the String.set_username()
andset_password()
to reset the values as empty strings..as_str()
or.to_string()
for theUrl
shows:https://:@example.com/
.Using version 2.3.1 of the crate.
The text was updated successfully, but these errors were encountered: