This commit is contained in:
xl
2023-11-22 10:35:49 +08:00
parent 09c3890ccd
commit d74cb4a7e3
-3
View File
@@ -126,9 +126,6 @@ class OnRequest implements OnRequestInterface
} catch (Throwable $throwable) { } catch (Throwable $throwable) {
$PsrResponse = $this->exception->emit($throwable, $this->constrictResponse); $PsrResponse = $this->exception->emit($throwable, $this->constrictResponse);
} finally { } finally {
if ($request->getMethod() === 'HEAD') {
$PsrResponse->getBody()->write('');
}
$this->responseEmitter->response($PsrResponse, $response, $PsrRequest); $this->responseEmitter->response($PsrResponse, $response, $PsrRequest);
} }
} }