Skip to content

Commit

Permalink
Fix headers parsing of HttpClient
Browse files Browse the repository at this point in the history
  • Loading branch information
kyryl-bogach committed Mar 22, 2022
1 parent 615dc42 commit 0924302
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Curl/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ private function execute(RequestInterface $request, $httpClient): ResponseInterf

$headerSize = curl_getinfo($httpClient, CURLINFO_HEADER_SIZE);
$headerString = substr($response, 0, $headerSize);
$headers = array_filter(explode("\n", $headerString), 'trim');
$headers = array_filter(array_map('trim', explode("\n", $headerString)));

$body = substr($response, $headerSize);

Expand All @@ -99,4 +99,4 @@ private function closeHttpClient($httpClient)
{
curl_close($httpClient);
}
}
}

0 comments on commit 0924302

Please sign in to comment.