From fef57f121c1cb9f72518267ca68b8b61c20c198b Mon Sep 17 00:00:00 2001 From: mr-ransel Date: Tue, 19 Sep 2017 12:57:23 +0200 Subject: [PATCH] Update Curl.php false header count error I've been unable to reproduce the error state described here. I can also find no record of curl having the described limitation --- src/Bart/Curl.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Bart/Curl.php b/src/Bart/Curl.php index 44af7d2..50f14dc 100644 --- a/src/Bart/Curl.php +++ b/src/Bart/Curl.php @@ -186,11 +186,9 @@ private function request($httpMethod, $path, array $getParams, $body, array $hea array_shift($pieces); } - $headerCount = count($pieces); - if ($headerCount != 2) { - throw new \Exception("Curl got more or less headers ($headerCount) than it knows how to deal with"); - } - + + + // grab the headers section $responseArray['headers'] = $this->parseHeaders(array_shift($pieces)); //combine the rest of the pieces, there could be line breaks in the body