nx_static_io.nx
buildroot/runtime/nx_static_io.nx
about
nx_static_io.nx -- sovereign static-file serving over HTTP.
Companion to nx_http_io that knows how to:
- Map a URL path to a filesystem path (with safety: no .. escape)
- Detect content-type from filename suffix
- stream the file body to a TCP socket
Built for nishi-web: a NishiLang HTTP server that hosts a static
site (e.g. andelinwest.com) without nginx / apache / wordpress.
genealogy_id: rfc_7230_http_1_1 + nginx_static_serve + caddy_file_server
lineage_id: nx_static_serve_sovereign_q10
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| none |
functions
| 38 | func _ct_html(out: *u8) -> i64 called by 1: nx_static_content_type |
| 47 | func _ct_css(out: *u8) -> i64 called by 1: nx_static_content_type |
| 56 | func _ct_js(out: *u8) -> i64 called by 1: nx_static_content_type |
| 62 | func _ct_json(out: *u8) -> i64 called by 1: nx_static_content_type |
| 68 | func _ct_md(out: *u8) -> i64 called by 1: nx_static_content_type |
| 73 | func _ct_png(out: *u8) -> i64 called by 1: nx_static_content_type |
| 77 | func _ct_jpeg(out: *u8) -> i64 called by 1: nx_static_content_type |
| 81 | func _ct_svg(out: *u8) -> i64 called by 1: nx_static_content_type |
| 85 | func _ct_octet(out: *u8) -> i64 called by 1: nx_static_content_type |
| 94 | func nx_static_content_type(path: *u8, path_len: i64, out: *u8) -> i64 |
| 173 | func nx_static_load_file(path: *u8, cap: i64, out_len: *i64) -> *u8 |
| 196 | func nx_static_path_is_safe(path: *u8, path_len: i64) -> i64 |
| 221 | func nx_static_join_path( |