Follow-up from PR #631 review (finding #7).
examples/web-capture/cmd/gateway/proxy.go hand-rolls copyHeaders/streamCopy/flushWriter/hopByHop, duplicating net/http/httputil.ReverseProxy:
FlushInterval = -1 gives immediate flushing for streaming responses.
- A
Director/Rewrite can inject the auth header + rewrite the target URL.
ModifyResponse can enforce the <400 status gate.
Correctness bonus: the hand-rolled hopByHop list misses headers named in the request's Connection header (RFC 7230 §6.1), which the stdlib strips automatically.
Deferred from PR #631 because the MSE path has bespoke readiness-retry + liveness logic (proxyMSE) layered on the streaming copy; migrating needs care to preserve that behavior and a separate review. Not a behavioral bug today.
Follow-up from PR #631 review (finding #7).
examples/web-capture/cmd/gateway/proxy.gohand-rollscopyHeaders/streamCopy/flushWriter/hopByHop, duplicatingnet/http/httputil.ReverseProxy:FlushInterval = -1gives immediate flushing for streaming responses.Director/Rewritecan inject the auth header + rewrite the target URL.ModifyResponsecan enforce the<400status gate.Correctness bonus: the hand-rolled
hopByHoplist misses headers named in the request'sConnectionheader (RFC 7230 §6.1), which the stdlib strips automatically.Deferred from PR #631 because the MSE path has bespoke readiness-retry + liveness logic (
proxyMSE) layered on the streaming copy; migrating needs care to preserve that behavior and a separate review. Not a behavioral bug today.