Disable closeNotify when method GET for http pipelining

This commit is contained in:
SALLEYRON Julien 2018-04-10 17:24:04 +02:00 committed by Traefiker Bot
parent f35d574759
commit 2387010556
7 changed files with 94 additions and 45 deletions

View file

@ -349,9 +349,10 @@ func (b *bufferWriter) expectBody(r *http.Request) bool {
if (b.code >= 100 && b.code < 200) || b.code == 204 || b.code == 304 {
return false
}
if b.header.Get("Content-Length") == "" && b.header.Get("Transfer-Encoding") == "" {
return false
}
// refer to https://github.com/vulcand/oxy/issues/113
// if b.header.Get("Content-Length") == "" && b.header.Get("Transfer-Encoding") == "" {
// return false
// }
if b.header.Get("Content-Length") == "0" {
return false
}