Skip to content

Commit

Permalink
fix reading post bodies (#686)
Browse files Browse the repository at this point in the history
Now that golang/go#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.
  • Loading branch information
withinboredom authored Mar 24, 2024
1 parent 0e163a0 commit d973206
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions frankenphp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit d973206

Please sign in to comment.