code wiki / (root) / nx_http_header_find.nx

nx_http_header_find.nx

buildroot/runtime/nx_http_header_find.nx

6510 B180 linesdepth 0pulls 0 transitivereach 373 importersview sourcekind librarytopic http
docsdependenciesstructsconstsfunctions

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

nx_http_header_find.nx nx_acme_response.nx nx_audit_server_routed.nx nx_http_cache.nx nx_http_header_find_test.nx nx_http_resolve_redirect.nx nx_https_redirect.nx nx_site_auth.nx nx_wiki_admin_wiring.nx nx_wiki_edit_handler.nx nx_wiki_https_daemon_mv.nx

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

38const NXHF_FOUND: i64 = 0
39const NXHF_NOT_FOUND: i64 = 1
40const NXHF_MALFORMED: i64 = 2
41const NXHF_BAD_ARG: i64 = 3
42const NXHF_VERDICT_N: i64 = 4

functions

44func nxhf_verdict_is_valid(v: i64) -> i64
called by 1: main
50func nxhf_verdict_name(v: i64) -> *u8
called by 1: main
61func nxhf_tolower(b: i64) -> i64
called by 2: nxhf_eq_cimain
68func nxhf_eq_ci(a: *u8, b: *u8, n: i64) -> i64
83func nxhf_next_line(buf: *u8, len: i64, off: i64) -> i64
called by 1: nx_http_header_find
106func nx_http_header_find(