From 654fd46313928bfb5d08777edca7a969c1678136 Mon Sep 17 00:00:00 2001 From: Piotr Potrebka <piotr.potrebka@wpdesk.net> Date: Mon, 7 Oct 2024 12:23:43 +0000 Subject: [PATCH] Revert "fix: body response" This reverts commit 6772406fcd50a3f9d25d1b7e2e062793c44b8e54 --- changelog.txt | 3 --- src/Curl/CurlClient.php | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 3e87b0d..bac951e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,3 @@ -= 1.0.5 - 2024-10-07 = -* Fixed body response - = 1.0.4 - 2020-12-09 = * Fixed issue with body diff --git a/src/Curl/CurlClient.php b/src/Curl/CurlClient.php index 6495d85..ace0598 100644 --- a/src/Curl/CurlClient.php +++ b/src/Curl/CurlClient.php @@ -155,8 +155,8 @@ class CurlClient implements HttpClient { * @return array */ private function extractResponseHeadersAndBody() { - $rawBody = $this->rawResponse; - $rawHeaders = implode( "\r\n", $this->headers ); + $rawBody = \trim( $this->rawResponse ); + $rawHeaders = \trim( implode( "\r\n", $this->headers ) ); return [ $rawHeaders, $rawBody ]; } -- GitLab