code wiki / _hdl_build / nx_http_chunked.nx
nx_http_chunked.nx
buildroot/runtime/_hdl_build/nx_http_chunked.nx
about
nx_http_chunked.nx -- LIB: HTTP/1.1 chunked transfer-encoding DECODER (RFC 7230 ยง4.1). THE concrete M2 unblock:
HuggingFace's dynamic API responses (the repo /tree enumerate) are chunked with NO Content-Length, so our
Content-Length reader blocks on them (this is exactly why nx_mirror_live_probe's tree fetch hung). This decodes a
chunked body buffer -> the raw bytes, so enumerate can proceed. Pure parsing (no crypto, no TLS) -> imports
nx_syscalls only (composes cleanly beside the TLS fetch stack, unlike nx_sha256). No 'break' (nx) -> flag-driven
loops. Bounded by the input length (never reads past src[n]). license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_apertus_tree_parse.nxnx_http_chunked_gate.nx
structs
| none |
consts
| none |
functions
| 10 | func hc_hexval(c: i64) -> i64 called by 1: chunked_decode |
| 18 | func hc_has(hay: *u8, n: i64, needle: *u8) -> i64 called by 1: hc_is_chunked |
| 32 | func hc_is_chunked(hdr: *u8, n: i64) -> i64 |
| 41 | func chunked_decode(src: *u8, n: i64, out: *u8) -> i64 |