code wiki / _hdl_build / nx_host_router2_test.nx
nx_host_router2_test.nx
buildroot/runtime/_hdl_build/nx_host_router2_test.nx
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
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
structs
| none |
consts
| none |
functions
| 14 | func 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 } |
| 15 | func 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 } |
| 16 | func 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 } |
| 17 | func t_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func t_has(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 25 | func t_check(name: *u8, cond: i64) -> i64 |
| 30 | func main() -> i64 |