(headers: &str, name: &str)
| 1104 | } |
| 1105 | |
| 1106 | fn header_value(headers: &str, name: &str) -> Option<String> { |
| 1107 | headers.lines().find_map(|line| { |
| 1108 | let (key, value) = line.split_once(':')?; |
| 1109 | key.trim() |
| 1110 | .eq_ignore_ascii_case(name) |
| 1111 | .then(|| value.trim().to_owned()) |
| 1112 | }) |
| 1113 | } |
| 1114 | |
| 1115 | fn decoded_http_body(headers: &str, body: &[u8]) -> Result<Vec<u8>, String> { |
| 1116 | if header_value(headers, "transfer-encoding").is_some_and(|value| { |
no outgoing calls
no test coverage detected