code wiki / _hdl_build / nx_clean_url.nx

nx_clean_url.nx

buildroot/runtime/_hdl_build/nx_clean_url.nx

3942 B85 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic clean
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_clean_url.nx nx_clean_url_gate.nx

imports: nx_syscalls.nx

imported by: nx_clean_url_gate.nx

structs

none

consts

none

functions

12func cu_app(out: *u8, pos: i64, cap: i64, s: *u8) -> i64
called by 1: cu_resolve
17func cu_match_at(s: *u8, i: i64, n: i64, pat: *u8, plen: i64) -> i64
24func cu_find_sub(hay: *u8, lo: i64, hi: i64, needle: *u8, nlen: i64) -> i64
30func cu_has_traversal(path: *u8, n: i64) -> i64
called by 1: cu_resolve
36func cu_seg_has_dot(path: *u8, n: i64) -> i64
called by 1: cu_resolve
44func cu_resolve(path: *u8, n: i64, out: *u8, cap: i64) -> i64