diff --git a/Handler/OnRequest.php b/Handler/OnRequest.php index 5f77083..598219b 100644 --- a/Handler/OnRequest.php +++ b/Handler/OnRequest.php @@ -126,6 +126,9 @@ class OnRequest implements OnRequestInterface } catch (Throwable $throwable) { $PsrResponse = $this->exception->emit($throwable, $this->constrictResponse); } finally { + if ($request->getMethod() === 'HEAD') { + $PsrResponse->getBody()->write(''); + } $this->responseEmitter->response($PsrResponse, $response, $PsrRequest); } }