From bb204462509a375ada73b114551620bc0ea8fc45 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Wed, 4 Aug 2021 02:49:04 +0800 Subject: [PATCH] modify --- HttpServer/Http/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index dc042bb5..b7d55951 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -70,7 +70,6 @@ class Response extends HttpService public function toHtml($content): string { $this->format = self::HTML; - var_dump($this->format); return (string)$content; } @@ -142,6 +141,7 @@ class Response extends HttpService */ public function getResponseFormat(): string { + var_dump($this->format); if ($this->format == self::HTML) { return 'text/html;charset=utf-8'; } else if ($this->format == self::XML) { @@ -173,8 +173,8 @@ class Response extends HttpService */ public function configure(SResponse $response = null): static { + var_dump($this->format); $response->setStatusCode($this->statusCode); - var_dump($this->getResponseFormat()); $response->header('Content-Type', $this->getResponseFormat()); $response->header('Run-Time', $this->getRuntime()); if (!empty($this->headers)) {