Fix content-length header assertion
Co-authored-by: Romain <rtribotte@users.noreply.github.com>
This commit is contained in:
parent
4fd6b10b7d
commit
cdd24e91b4
2 changed files with 1 additions and 4 deletions
|
@ -179,7 +179,6 @@ func (c *conn) handleResponse(r rwWithUpgrade) error {
|
|||
}
|
||||
|
||||
res.Reset()
|
||||
res.Header.Reset()
|
||||
res.Header.SetNoDefaultContentType(true)
|
||||
|
||||
continue
|
||||
|
@ -216,7 +215,7 @@ func (c *conn) handleResponse(r rwWithUpgrade) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
hasContentLength := res.Header.Peek("Content-Length") != nil
|
||||
hasContentLength := len(res.Header.Peek("Content-Length")) > 0
|
||||
|
||||
if hasContentLength && res.Header.ContentLength() == 0 {
|
||||
return nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue