Merge current v2.9 into v3.0
This commit is contained in:
commit
cd90b9761a
8 changed files with 74 additions and 13 deletions
|
@ -209,6 +209,15 @@ func (cc *codeCatcher) Flush() {
|
|||
// Otherwise, cc.code is actually a 200 here.
|
||||
cc.WriteHeader(cc.code)
|
||||
|
||||
// We don't care about the contents of the response,
|
||||
// since we want to serve the ones from the error page,
|
||||
// so we just don't flush.
|
||||
// (e.g., To prevent superfluous WriteHeader on request with a
|
||||
// `Transfert-Encoding: chunked` header).
|
||||
if cc.caughtFilteredCode {
|
||||
return
|
||||
}
|
||||
|
||||
if flusher, ok := cc.responseWriter.(http.Flusher); ok {
|
||||
flusher.Flush()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue