From ae24bf8d5403743dfb4f4400e436ddf97499825e Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 21 Nov 2021 23:46:57 +0100 Subject: [PATCH] Fixing Response --- src/Module/Response.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Module/Response.php b/src/Module/Response.php index 9bf9912360..29df82c044 100644 --- a/src/Module/Response.php +++ b/src/Module/Response.php @@ -100,18 +100,8 @@ class Response implements ICanCreateResponses */ public function generate(): ResponseInterface { - $headers = []; - - foreach ($this->headers as $key => $header) { - if (empty($key)) { - $headers[] = $header; - } else { - $headers[] = "$key: $header"; - } - } - // Setting the response type as an X-header for direct usage - $headers['X-RESPONSE-TYPE'] = $this->type; + $this->headers['X-RESPONSE-TYPE'] = $this->type; return new \GuzzleHttp\Psr7\Response(200, $this->headers, $this->content); } -- 2.39.5