nx_http_header_find.nx
buildroot/runtime/nx_http_header_find.nx
about
nx_http_header_find.nx -- case-insensitive HTTP header search.
Per RFC 7230 §3.2: header field names are case-insensitive. This
primitive scans a raw response header block + finds a named header
+ returns its value start offset + length via out params.
Used by:
- ACME (RFC 8555) Replay-Nonce extraction
- HTTP/HTTPS clients reading Location / Content-Type / etc.
- Audit-log header parsing
- Substrate browser cookie + content-disposition extraction
Header block format (RFC 7230 §3):
<status-line> CRLF
<name>: <value> CRLF
<name>: <value> CRLF
...
CRLF
(We accept LF-only too for tolerance per RFC 7230 §3.5.)
Per cardinal feedback-defensive-at-boundaries-trusting-internally:
search is bounded by the caller-supplied header_block_len; never
walks past.
nx_capability_claims:
needs: [sealed_enum, byte_ops]
provides: [http_header_case_insensitive_search]
safety: [no_unchecked_deref, no_floating_point, no_syscall,
bounded_iteration, bit_equal_reproducible]
verdict: [sealed_enum_4_state]
license: ORIGINAL
kind: racing_crew_specialist
layer: L2 (transform: bytes -> offset+length)
dependencies 0 imports · 12 importers
diagram shows first 10 each side; +0 more imports, +2 more importers in the complete lists below.
imports: none
imported by: nx_acme_response.nxnx_audit_server_routed.nxnx_http_cache.nxnx_http_header_find_test.nxnx_http_resolve_redirect.nxnx_https_redirect.nxnx_site_auth.nxnx_wiki_admin_wiring.nxnx_wiki_edit_handler.nxnx_wiki_https_daemon_mv.nxnx_wiki_main.nxnx_wiki_routes.nx
structs
| none |
consts
| 38 | const NXHF_FOUND: i64 = 0 |
| 39 | const NXHF_NOT_FOUND: i64 = 1 |
| 40 | const NXHF_MALFORMED: i64 = 2 |
| 41 | const NXHF_BAD_ARG: i64 = 3 |
| 42 | const NXHF_VERDICT_N: i64 = 4 |
functions
| 44 | func nxhf_verdict_is_valid(v: i64) -> i64 called by 1: main |
| 50 | func nxhf_verdict_name(v: i64) -> *u8 called by 1: main |
| 61 | func nxhf_tolower(b: i64) -> i64 |
| 68 | func nxhf_eq_ci(a: *u8, b: *u8, n: i64) -> i64 |
| 83 | func nxhf_next_line(buf: *u8, len: i64, off: i64) -> i64 called by 1: nx_http_header_find |
| 106 | func nx_http_header_find( |