From d9732061740d4e3815707b7b97b9706dc72982a8 Mon Sep 17 00:00:00 2001 From: Rob Landers Date: Sun, 24 Mar 2024 12:18:46 +0100 Subject: [PATCH] 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. --- frankenphp.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/frankenphp.go b/frankenphp.go index ebe720c..15b8f7c 100644 --- a/frankenphp.go +++ b/frankenphp.go @@ -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 }