diff --git a/src/uri/path.rs b/src/uri/path.rs index df00c415..170e1681 100644 --- a/src/uri/path.rs +++ b/src/uri/path.rs @@ -44,7 +44,7 @@ impl PathAndQuery { // percent-encoded in the path. If it should have been // percent-encoded, then error. #[rustfmt::skip] - 0x21 | + 0x20..=0x21 | 0x24..=0x3B | 0x3D | 0x40..=0x5F | @@ -561,6 +561,11 @@ mod tests { assert_eq!("/🍕", pq("/🍕").path()); } + #[test] + fn allow_space_in_path() { + assert_eq!("/dav/With Space/", pq("/dav/With Space/").path()); + } + #[test] fn allow_utf8_in_query() { assert_eq!(Some("pizza=🍕"), pq("/test?pizza=🍕").query());