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

[rust] Resolving "bar" relative to base "foo" results in "foo/bar" #4

Open
not-my-profile opened this issue Nov 14, 2021 · 1 comment

Comments

@not-my-profile
Copy link

println!("{}", Uri::parse("foo").unwrap().resolve(&Uri::parse("bar").unwrap()).to_string());

outputs foo/bar although it should output bar

See https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.3.

not-my-profile added a commit to not-my-profile/Uri that referenced this issue Nov 14, 2021
Previously

  Uri::parse("foo").unwrap().resolve(&Uri::parse("bar").unwrap()).to_string()

resulted in "foo/bar".

According to RFC 3986 it should however result in "bar".
See https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.3.

Fixes rhymu8354#4.
not-my-profile added a commit to not-my-profile/Uri that referenced this issue Nov 14, 2021
Previously

  Uri::parse("foo").unwrap().resolve(&Uri::parse("bar").unwrap()).to_string()

resulted in "foo/bar".

According to RFC 3986 it should however result in "bar".
See https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.3.

Fixes rhymu8354#4.
@not-my-profile
Copy link
Author

Since this crate is currently unmaintained I forked it as uris, so that I can use my bug fix. If you pick maintenance of this crate back up again feel free to pull in my fix from my fork (same for #3).

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

1 participant