Frame brokered HTTP responses once

This commit is contained in:
root
2026-07-18 01:33:57 +00:00
parent 6e4ef8ed7a
commit f89e33e241
6 changed files with 26 additions and 2 deletions
+9
View File
@@ -62,6 +62,15 @@ forced by Wasmtime: an `Engine`/`Store` cannot be safely re-created across
runtime. So the brokers hold the long-lived connection and units respond to
events the same way they respond to a page request — through a clean worker.
The broker-to-worker hop explicitly sets `GATEWAY_INTERFACE=CGI/1.1`. After
the Wasm core decodes request parameters it derives the guest's default status
syntax from that marker (`Status:` for FastCGI, `HTTP/1.1` for direct HTTP).
The FastCGI transport clears completed stdout/stderr as soon as their records
are queued and emits no stream records after `FCGI_END_REQUEST`. Together these
boundaries prevent a forwarded dynamic response from being parsed as body and
wrapped in a second HTTP response. The TCP and custom-server tests reject an
inner status line and require the exact dynamic body.
---
## 2. The membrane and the DValue ABI