code wiki / _hdl_build / nx_clean_url.nx
nx_clean_url.nx
buildroot/runtime/_hdl_build/nx_clean_url.nx
about
nx_clean_url.nx -- S-class CLEAN (extensionless) URL support for the Nishi hosting layer. Operator: "make sure
the urls dont need html." Two parts:
(1) cu_resolve(request_path) -> doc-root file: the GENERAL rule the sites daemon is missing today (it only
hardcodes per-page redirects). "/" -> index.html ; "/foo/" -> foo/index.html ; "/foo" (no ext) -> foo.html
(the clean URL) ; "/a.css" (has ext) -> served as-is. Traversal (".." ) REJECTED by construction.
(2) cu_audit_links(html) -> count of hrefs that still carry ".html" (so our generated pages can be PROVEN to
link cleanly). cu_link_is_clean(href) is the single-link predicate.
Sovereign primitive (nx_syscalls only); ready to wire into nx_sites_daemon_v2 (coordinate w/ the hosting
workstream -- it's the live production binary). license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_clean_url_gate.nx
structs
| none |
consts
| none |
functions
| 12 | func cu_app(out: *u8, pos: i64, cap: i64, s: *u8) -> i64 called by 1: cu_resolve |
| 17 | func cu_match_at(s: *u8, i: i64, n: i64, pat: *u8, plen: i64) -> i64 |
| 24 | func cu_find_sub(hay: *u8, lo: i64, hi: i64, needle: *u8, nlen: i64) -> i64 |
| 30 | func cu_has_traversal(path: *u8, n: i64) -> i64 called by 1: cu_resolve |
| 36 | func cu_seg_has_dot(path: *u8, n: i64) -> i64 called by 1: cu_resolve |
| 44 | func cu_resolve(path: *u8, n: i64, out: *u8, cap: i64) -> i64 |
| 67 | func cu_link_is_clean(href: *u8) -> i64 |
| 73 | func cu_audit_links(html: *u8, n: i64) -> i64 |