http_resp_parser.sg is the T12 sprint — parsing an HTTP/1.1 response at resp_buf @0x440000 into 9 structured fields stored at resp_parts_buf @0x450000 (9 × 8 B). Extracts: HTTP status code, reason phrase, Content-Type, Content-Length, Location header, and body offset. HTTP-RESP-PASS 7/7. 15432 B arm-el0.
Parse model
Status line + header field extraction
The parser scans bytes in resp_buf @0x440000 for HTTP/1.1 response structure. Status line: two spaces delimit the protocol version from the status code; a CR (written as poke8(..., 13) — Sigil has no \r escape) ends the status code and begins the reason phrase. Header scan: matches Content-Type, Content-Length, and Location header names; a blank line (CR+LF CR+LF) marks the body offset.
Results at resp_parts_buf @0x450000 (9 fields × 8 B each):
: separator.resp_buf where the body begins — set when the blank-line terminator (CR+LF CR+LF) is found.Test: 7 checks PASS. HTTP-RESP-PASS.
Note on implementation: CR is written via poke8(..., 13) rather than \r because Sigil's cc0 runtime has no \r escape sequence — a pattern that appears throughout the net parser suite.