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

Function is_http_token

crates/openshell-supervisor-network/src/l7/rest.rs:1468–1492  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

1466}
1467
1468fn is_http_token(value: &str) -> bool {
1469 !value.is_empty()
1470 && value.as_bytes().iter().all(|byte| {
1471 matches!(
1472 byte,
1473 b'!' | b'#'
1474 | b'$'
1475 | b'%'
1476 | b'&'
1477 | b'\''
1478 | b'*'
1479 | b'+'
1480 | b'-'
1481 | b'.'
1482 | b'^'
1483 | b'_'
1484 | b'`'
1485 | b'|'
1486 | b'~'
1487 | b'0'..=b'9'
1488 | b'A'..=b'Z'
1489 | b'a'..=b'z'
1490 )
1491 })
1492}
1493
1494#[derive(Default)]
1495struct WebSocketUpgradeHeaders {

Callers 3

parse_http_token_listFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected