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

Function host_header

crates/openshell-server/src/service_routing.rs:477–479  ·  view source on GitHub ↗
(headers: &HeaderMap)

Source from the content-addressed store, hash-verified

475}
476
477fn host_header(headers: &HeaderMap) -> Option<&str> {
478 headers.get(header::HOST)?.to_str().ok()
479}
480
481pub fn request_host<B>(req: &Request<B>) -> Option<&str> {
482 host_header(req.headers()).or_else(|| req.uri().authority().map(http::uri::Authority::as_str))

Callers 1

request_hostFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected