(path: &str)
| 814 | } |
| 815 | |
| 816 | pub fn is_metro_proxy_path(path: &str) -> bool { |
| 817 | path.starts_with('/') |
| 818 | && !path.starts_with("//") |
| 819 | && !path |
| 820 | .bytes() |
| 821 | .any(|byte| byte < 0x20 || byte == 0x7f || byte == b'\\') |
| 822 | && !path.split('/').any(|part| part == "..") |
| 823 | } |
| 824 | |
| 825 | pub fn is_metro_proxy_method(method: &str) -> bool { |
| 826 | matches!(method, "GET" | "HEAD" | "POST") |
no test coverage detected