(body: &str)
| 717 | } |
| 718 | |
| 719 | fn parse_form_body(body: &str) -> HashMap<String, String> { |
| 720 | body.split('&') |
| 721 | .filter(|part| !part.is_empty()) |
| 722 | .filter_map(|part| { |
| 723 | let (name, value) = part.split_once('=')?; |
| 724 | Some((decode_form_component(name), decode_form_component(value))) |
| 725 | }) |
| 726 | .collect() |
| 727 | } |
| 728 | |
| 729 | fn decode_form_component(value: &str) -> String { |
| 730 | let bytes = value.as_bytes(); |
no test coverage detected