(req: &Request<Body>)
| 468 | } |
| 469 | |
| 470 | fn upstream_uri_path(req: &Request<Body>) -> Result<&str, ServiceRouteError> { |
| 471 | let path = req.uri().path_and_query().map_or("/", |path| path.as_str()); |
| 472 | path.parse::<http::Uri>() |
| 473 | .map(|_| path) |
| 474 | .map_err(|_| ServiceRouteError::invalid_request()) |
| 475 | } |
| 476 | |
| 477 | fn host_header(headers: &HeaderMap) -> Option<&str> { |
| 478 | headers.get(header::HOST)?.to_str().ok() |
no test coverage detected