nx_static_io_simple.nx source
↩ module page · 31 lines · 1156 B
1// nx_static_io_simple.nx -- simpler content_type to bisect the hang.
2
3// nx_safety_envelope:
4// intended_use: AUTO_APPLIED -- primitive-specific tuning queued
5// sil_target: SIL1
6// evidence: [bulk_applied_2026-05-16, see-file-comment-for-detail]
7// verdict: NOT_YET_EVALUATED
8
9import "nx_syscalls_x86_64.nx"
10
11func _ct_html_x(out: *u8) -> i64 {
12 out[0]=116;out[1]=101;out[2]=120;out[3]=116;out[4]=47
13 out[5]=104;out[6]=116;out[7]=109;out[8]=108
14 return 9
15}
16
17func _ct_octet_x(out: *u8) -> i64 {
18 out[0]=97;out[1]=112;out[2]=112;out[3]=47;out[4]=98;out[5]=105;out[6]=110
19 return 7
20}
21
22// Single-branch: if path ends in .html return ct_html, else ct_octet.
23func nx_ct_simple(path: *u8, path_len: i64, out: *u8) -> i64 {
24 if path_len < 5 { return _ct_octet_x(out) }
25 if path[path_len - 5] != 46 { return _ct_octet_x(out) }
26 if path[path_len - 4] != 104 { return _ct_octet_x(out) }
27 if path[path_len - 3] != 116 { return _ct_octet_x(out) }
28 if path[path_len - 2] != 109 { return _ct_octet_x(out) }
29 if path[path_len - 1] != 108 { return _ct_octet_x(out) }
30 return _ct_html_x(out)
31}