(name: &str)
| 657 | b'!' | b'#' | b'$' | b'%' | b'&' | b'\'' | b'*' | b'+' | |
| 658 | b'-' | b'.' | b'^' | b'_' | b'`' | b'|' | b'~' | |
| 659 | b'0'..=b'9' | b'A'..=b'Z' | b'a'..=b'z' |
| 660 | ) |
| 661 | }) |
| 662 | } |
| 663 | |
| 664 | /// Check for bare CR or LF in the interior of the value (not leading/trailing) |
| 665 | fn has_bare_cr_lf(value: &str) -> bool { |
| 666 | let trimmed = value.trim_matches(|c: char| c == ' ' || c == '\t' || c == '\n' || c == '\r'); |
| 667 | trimmed.bytes().any(|b| b == b'\n' || b == b'\r') |
| 668 | } |
| 669 | fn is_http_header_value(value: &str) -> bool { |
| 670 | value.chars().all(|c| { |
| 671 | let cp = c as u32; |
| 672 | cp == 0x09 // HTAB |
| 673 | || cp == 0x0C // Form Feed |
| 674 | || (0x20..=0x7E).contains(&cp) // SP + VCHAR |
no test coverage detected