Skip to content

Commit

Permalink
Merge pull request #36 from mr-ransel/master
Browse files Browse the repository at this point in the history
Update Curl.php false header count error
  • Loading branch information
mr-ransel authored Sep 20, 2017
2 parents 5ca14e8 + fef57f1 commit 8820baa
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Bart/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8820baa

Please sign in to comment.