Skip to content

Commit

Permalink
Fix exception thrown when server omit Content-lenght header
Browse files Browse the repository at this point in the history
  • Loading branch information
borivojevic committed Oct 8, 2013
1 parent 5347d9e commit 0c27ebf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RescueTime/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private function handleResponse($response)
throw new \Exception("HTTP request failed");
}

if ($response->getContentLength() == 0) {
if ($response->getInfo("size_download") == 0) {
throw new \Exception("HTTP body empty");
}

Expand Down

0 comments on commit 0c27ebf

Please sign in to comment.