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:
Tomás Senart 2014-12-16 15:12:45 +01:00
parent ee00f9ca58
commit c106d48719
1 changed files with 1 additions and 1 deletions

View File

@ -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 {