Description
Follow-up from PR #643 review (inline comment).
The wasm32-only CloudflareHttpClient (execute/select, redirect handling, response-body cap, and hop-by-hop header stripping) has no test target — CI only cargo checks it for wasm32-unknown-unknown, never exercises it. This is how the round-7 redirect-follow SSRF bug went unverified.
Not blocking for PR #643 (the logic is now reviewed and the fixes are in), but this path needs real coverage.
What to do
- Extract the redirect, body-cap, and header-stripping logic out of the wasm-only
CloudflareHttpClient into native-testable free functions, as the Axum and Fastly adapters already do for their HTTP clients.
- Add native unit tests exercising:
- manual redirect handling / per-hop allowlist behavior (no auto-follow),
- the 10 MiB response-body cap (Content-Length pre-check + post-buffer check),
- hop-by-hop header stripping (
is_hop_by_hop_response_header + Connection-token list).
Done when
Affected area
Cloudflare runtime / CI / Tooling
Description
Follow-up from PR #643 review (inline comment).
The
wasm32-onlyCloudflareHttpClient(execute/select, redirect handling, response-body cap, and hop-by-hop header stripping) has no test target — CI onlycargo checks it forwasm32-unknown-unknown, never exercises it. This is how the round-7 redirect-follow SSRF bug went unverified.Not blocking for PR #643 (the logic is now reviewed and the fixes are in), but this path needs real coverage.
What to do
CloudflareHttpClientinto native-testable free functions, as the Axum and Fastly adapters already do for their HTTP clients.is_hop_by_hop_response_header+Connection-token list).Done when
cargo checkon wasm).Affected area
Cloudflare runtime / CI / Tooling