Use 200 as default captured status in InstrumenHandler
When a http.Handler doesn't call WriteHeader explicitly, a 200 status code is to be assumed.
This commit is contained in:
parent
ee00f9ca58
commit
c106d48719
|
@ -117,7 +117,7 @@ func InstrumentHandlerWithOpts(opts SummaryOpts, hnd http.Handler) http.Handler
|
|||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
now := time.Now()
|
||||
|
||||
delegate := &responseWriterDelegator{ResponseWriter: w}
|
||||
delegate := &responseWriterDelegator{ResponseWriter: w, status: 200}
|
||||
out := make(chan int)
|
||||
urlLen := 0
|
||||
if r.URL != nil {
|
||||
|
|
Loading…
Reference in New Issue