fix reading post bodies (#686)

Now that https://github.com/golang/go/issues/15527 is supposedly fixed, this condition should be no-longer needed. Further, if php didn't request enough bytes, this condition would be hit. It appears PHP requests chunks ~2mb in size at a time.
This commit is contained in:
Rob Landers 2024-03-24 12:18:46 +01:00 committed by GitHub
parent 0e163a0a75
commit d973206174
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -746,12 +746,6 @@ func go_read_post(rh C.uintptr_t, cBuf *C.char, countBytes C.size_t) (readBytes
readBytes += C.size_t(n)
}
if err != nil && err != io.EOF {
// invalid Read on closed Body may happen because of https://github.com/golang/go/issues/15527
fc, _ := FromContext(r.Context())
fc.logger.Error("error while reading the request body", zap.Error(err))
}
return
}