Closes #56 Co-authored-by: Mathias <mthbqv@gmail.com>
This commit was merged in pull request #63.
This commit is contained in:
@@ -125,6 +125,11 @@ type statusWriter struct {
|
||||
wroteHeader bool
|
||||
}
|
||||
|
||||
// Unwrap exposes the underlying writer to http.ResponseController, so a handler behind this
|
||||
// middleware can still set a connection read deadline (#56: without it the upload idle bound
|
||||
// was silently unavailable in production).
|
||||
func (s *statusWriter) Unwrap() http.ResponseWriter { return s.ResponseWriter }
|
||||
|
||||
func (s *statusWriter) WriteHeader(code int) {
|
||||
if !s.wroteHeader {
|
||||
s.code = code
|
||||
|
||||
Reference in New Issue
Block a user