Unified · Split
| @@ -86,6 +86,7 @@ pub(crate) fn url(input: &BStr, protocol_end: usize) -> Result<crate::Url, Error · 85 unmodified lines | |||
| 86 | const MAX_LEN: usize = 1024; | 86 | const MAX_LEN: usize = 1024; |
| 87 | let bytes_to_path = input[protocol_end + "://".len()..] | 87 | let bytes_to_path = input[protocol_end + "://".len()..] |
| 88 | .iter() | 88 | .iter() |
| 89 | .filter(|b| !b.is_ascii_whitespace()) | ||
| 89 | .skip_while(|b| **b == b'/') | 90 | .skip_while(|b| **b == b'/') |
| 90 | .position(|b| *b == b'/') | 91 | .position(|b| *b == b'/') |
| 91 | .unwrap_or(input.len() - protocol_end); | 92 | .unwrap_or(input.len() - protocol_end); |
Binary file not shown.
| @@ -139,7 +139,7 @@ mod unknown { · 138 unmodified lines | |||
| 139 | 139 | ||
| 140 | #[test] | 140 | #[test] |
| 141 | fn fuzzed() { | 141 | fn fuzzed() { |
| 142 | for name in ["very-long", "very-long2", "very-long3"] { | 142 | for name in ["very-long4", "very-long3", "very-long2", "very-long"] { |
| 143 | let base = Path::new("tests").join("fixtures").join("fuzzed"); | 143 | let base = Path::new("tests").join("fixtures").join("fuzzed"); |
| 144 | let location = base.join(Path::new(name).with_extension("url")); | 144 | let location = base.join(Path::new(name).with_extension("url")); |
| 145 | let url = std::fs::read(&location).unwrap(); | 145 | let url = std::fs::read(&location).unwrap(); |