Ignore useless error message "broken pipe" (#30801)
Fix #30792 (cherry picked from commit 53b55223d167c3fc996dd0278a656f421408ace7)
This commit is contained in:
parent
b29190c4f0
commit
d93d62371c
3 changed files with 4 additions and 7 deletions
|
@ -234,9 +234,7 @@ func (b *Base) plainTextInternal(skip, status int, bs []byte) {
|
|||
b.Resp.Header().Set("Content-Type", "text/plain;charset=utf-8")
|
||||
b.Resp.Header().Set("X-Content-Type-Options", "nosniff")
|
||||
b.Resp.WriteHeader(status)
|
||||
if _, err := b.Resp.Write(bs); err != nil {
|
||||
log.ErrorWithSkip(skip, "plainTextInternal (status=%d): write bytes failed: %v", status, err)
|
||||
}
|
||||
_, _ = b.Resp.Write(bs)
|
||||
}
|
||||
|
||||
// PlainTextBytes renders bytes as plain text
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue