Skip to content

Commit

Permalink
Fix HEAD requests in HTTP/2
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Nov 18, 2022
1 parent 2836e1a commit 410c704
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Connection/Internal/Http2ConnectionProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}

Expand Down

0 comments on commit 410c704

Please sign in to comment.