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

The program crashed after using the "join" function. #838

Closed
1 task
xizheyin opened this issue May 18, 2023 · 0 comments · Fixed by #839
Closed
1 task

The program crashed after using the "join" function. #838

xizheyin opened this issue May 18, 2023 · 0 comments · Fixed by #839

Comments

@xizheyin
Copy link

xizheyin commented May 18, 2023

  • Note that this crate implements the URL Standard not RFC 1738 or RFC 3986

Describe the bug
A clear and concise description of what the bug is. Include code snippets if possible.

This is the version of url:

[dependencies]
url = "=2.3.1"

This is the code that trigger bugs:

fn main() {
    let s1 = "fIlE:p:?../";
    let s2 = "../";
    let url = url::Url::parse(s1).unwrap();
    let _ = url::Url::join(&url, s2);
}

Run this code, we will get the error message below:

thread 'main' panicked at 'assertion failed: self.serialization.as_bytes()[segment_start - 1] == b\'/\'', /home/yxz/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/url-2.3.1/src/parser.rs:1227:21
bors-servo added a commit that referenced this issue May 31, 2023
Fix issues with file drives

Fixes #838
bors-servo added a commit that referenced this issue Jun 1, 2023
Fix issues with file drives

Fixes #838
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

Successfully merging a pull request may close this issue.

1 participant