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

Round-trip parsing for a URL string results in different outcomes #391

Closed
frewsxcv opened this issue Sep 28, 2017 · 4 comments
Closed

Round-trip parsing for a URL string results in different outcomes #391

frewsxcv opened this issue Sep 28, 2017 · 4 comments

Comments

@frewsxcv
Copy link
Contributor

  • parsing "b:/.//" into a URL becomes "b://"
  • parsing "b://" into a URL becomes "b:///"

the intermediary state here seems off to me

seems like it should go straight from"b:/.//" to "b:///"

extern crate url;

fn main() {
    let parsed = url::Url::parse("b:/.//").unwrap();
    let as_str = parsed.as_str();
    let parsed2 = url::Url::parse(as_str).unwrap();
    assert_eq!(parsed, parsed2);
}
@frewsxcv
Copy link
Contributor Author

Found via #392

@nox
Copy link
Contributor

nox commented Jul 18, 2019

@frewsxcv Do you remember what the spec says about this?

@nox
Copy link
Contributor

nox commented Jul 18, 2019

Safari parses both as b://.

@qsantos
Copy link
Contributor

qsantos commented Mar 19, 2023

This looks like this is the same bug as #799, which was fixed by #817. At any rate, the assertion from the code example now passes.

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

4 participants