Skip to content

Commit

Permalink
Support (ignore) 1xx status codes. (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitar authored Nov 17, 2022
1 parent 8b7a371 commit 661666c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion capture_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (m *Metrics) CaptureMetrics(w http.ResponseWriter, fn func(http.ResponseWri
return func(code int) {
next(code)

if !headerWritten {
if !(code >= 100 && code <= 199) && !headerWritten {
m.Code = code
headerWritten = true
}
Expand Down

0 comments on commit 661666c

Please sign in to comment.