From d77f5b16c318f135fdc4c5ce13a2e2778b3e6463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 18 Sep 2021 18:03:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- http-message/Response.php | 9 --------- http-server/Constrict/ResponseInterface.php | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/http-message/Response.php b/http-message/Response.php index c0b1781b..ebceebd8 100644 --- a/http-message/Response.php +++ b/http-message/Response.php @@ -113,15 +113,6 @@ class Response implements ResponseInterface return $this->hasHeader('Content-Type'); } - - /** - * @return string - */ - #[Pure] public function getContentType(): string - { - return $this->getHeaderLine('Content-Type'); - } - /** * @param string|null $value * @return Response diff --git a/http-server/Constrict/ResponseInterface.php b/http-server/Constrict/ResponseInterface.php index 036b66b2..053b97c3 100644 --- a/http-server/Constrict/ResponseInterface.php +++ b/http-server/Constrict/ResponseInterface.php @@ -43,9 +43,9 @@ interface ResponseInterface extends \Psr\Http\Message\ResponseInterface /** - * @return string + * @return string|null */ - public function getContentType(): string; + public function getContentType(): ?string; /**