diff --git a/src/Connection/Internal/Http2ConnectionProcessor.php b/src/Connection/Internal/Http2ConnectionProcessor.php index 9effa3fb..7542f026 100644 --- a/src/Connection/Internal/Http2ConnectionProcessor.php +++ b/src/Connection/Internal/Http2ConnectionProcessor.php @@ -488,7 +488,9 @@ public function handleHeaders(int $streamId, array $pseudo, array $headers, bool return; } - $stream->expectedLength = (int) $contentLength; + if ($stream->request->getMethod() !== 'HEAD') { + $stream->expectedLength = (int)$contentLength; + } } }