code wiki / _hdl_build / nx_host_router2_test.nx

nx_host_router2_test.nx

buildroot/runtime/_hdl_build/nx_host_router2_test.nx

5492 B95 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic host
docsdependenciesstructsconstsfunctions

about

nx_host_router2_test.nx -- ENGINEER gate for the v2 serving path (hr_serve2 / hr_emit_b / hr_emit_404). Real files, real request bytes. Proves: (1) 200 + keep-alive (NOT close) on hit, (2) MISS verdict on absent file (daemon falls through to legacy routing -- the rung that lets nishifamily.com live in sites.conf without killing /wiki), (3) MISS on unknown host, (4) 400 on traversal, (5) TOOBIG -> 500 when the file exceeds outcap (the old hr_emit memory-corruption defect), (6) new MIME entries (.webmanifest), (7) hr_emit_404 well-formed, (8) old hr_serve byte-behaviour untouched (API contract stability). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_host_router.nx nx_host_router2_test.nx

imports: nx_host_router.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main t_puts t_wr sys_openat_wr t_slen t_check t_puts ↻ t_has t_slen ↻ hr_serve sys_mmap hr_req_host hr_ieq hr_lower hr_lower ↻ hr_req_path hr_lookup_root hr_eq hr_copy hr_emit hr_putdec sys_mmap ↻ hr_slen hr_path_safe hr_resolve sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close hr_ctype hr_ieq ↻ t_pn hr_putdec ↻

structs

none

consts

none

functions

14func t_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: t_checkmain
15func t_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); let nn: i64=hr_putdec(b,v); sys_write(1,b,nn); return 0 }
called by 1: main calls 1: hr_putdec
16func t_wr(path: *u8, data: *u8, n: i64) -> i64 { let fd: i64=sys_openat_wr(path,0x1a4); if fd<0{return 0-1} sys_write(fd,data,n); sys_close(fd); return 0 }
called by 1: main calls 1: sys_openat_wr
17func t_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: t_hasmain
18func t_has(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: main calls 1: t_slen
25func t_check(name: *u8, cond: i64) -> i64
called by 1: main calls 1: t_puts
30func main() -> i64