mirror of https://github.com/golang/go.git
on canceled context, return 503 instead of 200
This commit is contained in:
parent
434978f932
commit
9983850357
|
|
@ -3370,6 +3370,7 @@ func (h *timeoutHandler) ServeHTTP(w ResponseWriter, r *Request) {
|
|||
io.WriteString(w, h.errorBody())
|
||||
tw.err = ErrHandlerTimeout
|
||||
default:
|
||||
w.WriteHeader(StatusServiceUnavailable)
|
||||
tw.err = err
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue