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

empty string when password does not exists #804

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

raccmonteiro
Copy link

@raccmonteiro raccmonteiro commented Nov 15, 2022

Accordingly to standard (https://url.spec.whatwg.org/#url-representation) when the url does not have a password we should get an empty string: "A URL’s password is an ASCII string identifying a password. It is initially the empty string."

So, this changes password function from password(&self) -> Option<&str> to password(&self) -> &str

Closes #793

standard: https://url.spec.whatwg.org/#url-representation
"A URL’s password is an ASCII string identifying a password. It is initially the empty string."

test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

URL with empty password is parsed as None
2 participants