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

Function header_str

crates/openshell-supervisor-network/src/l7/graphql.rs:547–555  ·  view source on GitHub ↗
(request: &L7Request)

Source from the content-addressed store, hash-verified

545}
546
547fn header_str(request: &L7Request) -> Result<&str> {
548 let header_end = request
549 .raw_header
550 .windows(4)
551 .position(|w| w == b"\r\n\r\n")
552 .map_or(request.raw_header.len(), |p| p + 4);
553 std::str::from_utf8(&request.raw_header[..header_end])
554 .map_err(|_| miette!("GraphQL HTTP headers contain invalid UTF-8"))
555}
556
557fn reject_unsupported_headers(headers: &str) -> Result<()> {
558 for line in headers.lines().skip(1) {

Callers 1

inspect_graphql_requestFunction · 0.70

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected