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

Chinese characters and other unicode characters cannot be used for redirects #999

Open
supemeko opened this issue Dec 1, 2024 · 1 comment

Comments

@supemeko
Copy link

supemeko commented Dec 1, 2024

Describe the bug
Chinese characters and other unicode characters cannot be used for redirects
汉字和其他unicode字符不能用于重定向

To Reproduce

#[test]
fn test() {
     //salvo::hyper::Uri
    let uri: Uri = "/1235/444".try_into().unwrap(); // is ok
    Redirect::found("/1235/汉字"); // panic: invalid uri: Other("It isn't a valid URI")
    let uri: Uri = "/1235/汉字".try_into().unwrap(); // panic: called `Result::unwrap()` on an `Err` value: InvalidUri(InvalidUriChar)
}

Desktop (please complete the following information):

  • OS: Ubuntu 24.04.1 LTS
  • Version 0.74.2
@xlfish233
Copy link

尝试将:"/1235/汉字" uriencode后 传入 Uri

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

2 participants