We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a912445 commit 091ee9aCopy full SHA for 091ee9a
src/uri/path.rs
@@ -50,7 +50,7 @@ impl PathAndQuery {
50
0x40..=0x5F |
51
0x61..=0x7A |
52
0x7C |
53
- 0x7E => {}
+ 0x7E..=0xFF => {}
54
55
// These are code points that are supposed to be
56
// percent-encoded in the path but there are clients
@@ -82,7 +82,7 @@ impl PathAndQuery {
82
0x21 |
83
0x24..=0x3B |
84
0x3D |
85
- 0x3F..=0x7E => {}
+ 0x3F..=0xFF => {}
86
87
b'#' => {
88
fragment = Some(i);
@@ -556,6 +556,16 @@ mod tests {
556
assert_eq!("qr=%3", pq("/a/b?qr=%3").query().unwrap());
557
}
558
559
+ #[test]
560
+ fn allow_utf8_in_path() {
561
+ assert_eq!("/🍕", pq("/🍕").path());
562
+ }
563
+
564
565
+ fn allow_utf8_in_query() {
566
+ assert_eq!(Some("pizza=🍕"), pq("/test?pizza=🍕").query());
567
568
569
#[test]
570
fn json_is_fine() {
571
assert_eq!(
0 commit comments