You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CaptureMetrics reports 200 after a zero-byte ReadFrom #42
Consequently, e.g. a subsequent 5xx response emission or a 204 response emission would be tracked with a status code of 200 (which is the initial value, see here).
As a solution, we could set headerWritten only when n > 0,
We probably want regression tests for two cases, for example:
source returns an error before producing any bytes; the handler then sends 502, the client receives it, and httpsnoop captures the 502
source reaches EOF without producing any bytes; the handler then sends 204, the client receives it, and httpsnoop captures the 204
Activity