0181: Curl config request boundaries in HTTP v1
Status: Proposed (pending maintainer)
Context
M-HTTP.5 passes configuration on curl stdin, not a
separate body pipe. Curl's config string syntax cannot represent
NUL; data-binary also treats a leading @
as file indirection. A broad URL parser would introduce authority
normalization and multiple-request ambiguity.
Decision
The capability-free client accepts UTF-8 request bodies without
NUL or a leading @, with fixed errors otherwise.
Response bodies remain arbitrary bytes. URL authorities are exact
lowercase ASCII DNS/IP-label names in the allowlist; credentials,
explicit ports, escapes in authorities, fragments and backslashes
are rejected. URL globbing is disabled. Redirects, ambient curl
configuration, netrc authentication and proxies are not enabled.
Headers and methods are validated before invoking the runner;
errors never include runner output. Caller Host, framing and
hop-by-hop headers are rejected; curl owns framing. The host
runner must require curl 8.4.0+ for streamed size enforcement; the
demo checks its version locally before opening the listener.
Alternatives considered
- Put binary bodies in temporary files: requires filesystem authority in the host and introduces cleanup and lifetime work outside v1's pure runner API.
- Add a second input stream or native TLS client now: expands the agreed process or crypto scope to satisfy a use case the demo does not need.
- Accept arbitrary URL authorities and normalize them: adds security-sensitive canonicalization that v1's exact allowlist does not need.
Consequences
Some otherwise valid HTTPS URLs and binary request bodies are
intentionally unsupported. The public Fetch.body
stays bytes so callers get a fixed error rather than
a UTF-8 trap. Tests use only canned runners and fake curl.