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 39398fb commit bf825dcCopy full SHA for bf825dc
crates/cargo-test-support/src/registry.rs
@@ -794,7 +794,10 @@ impl HttpServer {
794
line.clear();
795
break;
796
}
797
- let (name, value) = line.split_once(':').unwrap();
+ if line.as_bytes().iter().any(|&b| b > 127 || b == 0) {
798
+ panic!("Invalid char in HTTP header: {line:?}");
799
+ }
800
+ let (name, value) = line.split_once(':').expect("http header syntax");
801
let name = name.trim().to_ascii_lowercase();
802
let value = value.trim().to_string();
803
match name.as_str() {
0 commit comments