Skip to content

Deadbytes101/DEADWIRE-HTTPD

Repository files navigation

DEADWIRE HTTPD

DEADWIRE HTTPD

SMALL HTTP/1.0 STATIC SERVER. RAW BACKENDS. NO FRAMEWORK.

http asm keep alive framework

Current truth

DEADWIRE HTTPD is a small static HTTP/1.0 server with explicit platform backends.

Linux default is the V2.2 close-after-response server:

/style.css              V2.1 prebuilt style-fast hot route
generic static fallback V2.2 PATH TRUTH gate before filesystem open

Windows default remains the stable close-after-response backend. The V2 triple-thread runtime remains an opt-in Windows proof runtime and is not the Linux default.

Official comparison notes live under docs/benchmarks/ and docs/benchmarks/results/.

V2.2 path truth

The generic Linux static fallback now performs this pipeline before openat:

raw path length bound
strict path-only percent decode
byte validation
slash and single-dot normalization
segment-aware traversal rejection
public-root path construction
filesystem open

Rejected forms include malformed escapes, decoded NUL/control/DEL/non-ASCII bytes, literal or decoded backslash, exact .. segments after decoding, and overlong paths.

The hostile request corpus currently contains 21 cases.

Speed proof

Latest recorded V2.2 no-regression run:

WSL close-mode /style.css, 4096 requests, 7 rounds
ASMHTTPD_UPSTREAM: DEADWIRE_STYLE_FAST won 3/3 ports, ratio 1.342x to 1.453x
MINSERV_UPSTREAM: DEADWIRE_STYLE_FAST won, ratio 2.389x

No broader performance claim is implied. Claims must name the exact build flavor and lane.

Linux default pipeline

flowchart LR
    Client["Client socket"]
    Read["read request"]
    Parse["parse method and raw path"]
    Route{"route decision"}
    Health["/health<br/>prebuilt response"]
    StyleFast["/style.css<br/>prebuilt style-fast response"]
    PathTruth["PATH TRUTH<br/>decode validate normalize"]
    Static["public-root path<br/>open lseek read close"]
    Error["400 / 403 / 404 / 414"]
    Close["send and close"]

    Client --> Read --> Parse --> Route
    Route -->|/health| Health --> Close
    Route -->|/style.css| StyleFast --> Close
    Route -->|other| PathTruth
    PathTruth -->|safe path| Static --> Close
    PathTruth -->|reject| Error --> Close
    Close --> Client
Loading

Opt-in V2 runtime

flowchart LR
    T0["Thread 0<br/>supervisor"]
    T1["Thread 1<br/>acceptor"]
    Slot[("one-slot descriptor handoff")]
    T2["Thread 2<br/>HTTP engine"]

    T0 --> T1
    T0 --> T2
    T1 --> Slot --> T2
Loading
NO WORKER POOL
NO THREAD PER CONNECTION
ONE DESCRIPTOR OWNER AT A TIME

Architecture references:

TRIPLE_THREAD_RUNTIME.md
docs/architecture/architectural-pipeline.md
docs/architecture/linux-style-fast-default.md
docs/architecture/v2-hot-static-plan.md
docs/architecture/v2-style-fast-contract.md
docs/security/path-truth-contract.md

Build and verify

make clean
make doctor
make verify
make run

make verify runs:

generic server verification
style-fast correctness verification
V2.2 hostile path corpus verification

Linux artifacts

sh scripts/build-linux-style-fast.sh

This produces:

build/deadwire                    Linux default executable
build/deadwire_linux_style_fast   named artifact for the same binary

Prove style-fast

make prove-style-fast

This checks /style.css correctness first, then runs the ASMHTTPD and Minserv score lanes. The proof preflight requires as, ld, curl, git, make, yasm, nasm, gcc, and cc.

Windows V2 proof runtime

The triple-thread runtime remains Windows-only and opt-in:

make verify-runtime-boundary
make verify-triple-thread

Linux reports these targets as Windows-only instead of silently passing them.

Windows build flavors

build/deadwire.exe                 default close-after-response server
build/deadwire_accesslog_off.exe   quiet close-after-response bench server
build/deadwire_keepalive.exe       opt-in keep-alive server
build/deadwire_v2_runtime.exe      opt-in V2 triple-thread proof runtime

Benchmark docs

docs/benchmarks/upstream-asmttpd-score-lane.md
docs/benchmarks/upstream-minserv-score-lane.md
docs/benchmarks/external-assembly-targets.md
docs/benchmarks/results/2026-07-02-wsl-style-fast-proof.md
docs/benchmarks/results/v2.2-path-truth-no-regression.md
docs/benchmarks/results/README.md

Milestone status

V2.1 style-fast: promoted to Linux default hot route
V2.2 path truth: merged and verified 21/21
ASMHTTPD proof lane: passed
Minserv proof lane: passed
web-server-assembly: sanity passed, not feature parity

Limits

REQUEST BUFFER                 4096 BYTES
RAW REQUEST PATH BOUND          500 BYTES
MAX SERVED FILE               65536 BYTES
STRICT PATH-ONLY %HH DECODING
NO CHUNKED ENCODING
NOT TLS
NOT CGI
NOT INTERNET FACING

Every platform boundary is explicit.