Skip to content
Snippets Groups Projects
Commit 2bcfb17d authored by Marcin Kolanko's avatar Marcin Kolanko
Browse files

explode response for only 2 pieces

parent 779882df
No related branches found
No related tags found
1 merge request!2Devel
...@@ -158,7 +158,7 @@ class CurlClient implements HttpClient ...@@ -158,7 +158,7 @@ class CurlClient implements HttpClient
*/ */
private function extractResponseHeadersAndBody() private function extractResponseHeadersAndBody()
{ {
$parts = explode("\r\n\r\n", $this->rawResponse); $parts = explode("\r\n\r\n", $this->rawResponse, 2 );
$rawBody = array_pop($parts); $rawBody = array_pop($parts);
$rawHeaders = implode("\r\n\r\n", $parts); $rawHeaders = implode("\r\n\r\n", $parts);
return [trim($rawHeaders), trim($rawBody)]; return [trim($rawHeaders), trim($rawBody)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment