(response: &[u8])
| 593 | } |
| 594 | |
| 595 | fn response_has_complete_body(response: &[u8]) -> bool { |
| 596 | let Some((headers, body)) = split_http_response(response) else { |
| 597 | return false; |
| 598 | }; |
| 599 | content_length(&headers).is_some_and(|length| body.len() >= length) |
| 600 | } |
| 601 | |
| 602 | fn content_length(headers: &str) -> Option<usize> { |
| 603 | headers.lines().find_map(|line| { |
no test coverage detected