MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / upstream_uri_path

Function upstream_uri_path

crates/openshell-server/src/service_routing.rs:470–475  ·  view source on GitHub ↗
(req: &Request<Body>)

Source from the content-addressed store, hash-verified

468}
469
470fn 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
477fn host_header(headers: &HeaderMap) -> Option<&str> {
478 headers.get(header::HOST)?.to_str().ok()

Callers 1

proxy_to_endpointFunction · 0.85

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected