summaryrefslogtreecommitdiff
path: root/inc/HTTPClient.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2013-02-16 13:17:40 +0100
committerAndreas Gohr <andi@splitbrain.org>2013-02-16 13:17:40 +0100
commit8b48b31f60c1acd63fbe9f35207377209faac012 (patch)
treead79a913032cd12ee55c9b8769882d99ceaa50fe /inc/HTTPClient.php
parent7b9186a5c6e5a5f070396dd6455e8b06b9da16c8 (diff)
downloadrpg-8b48b31f60c1acd63fbe9f35207377209faac012.tar.gz
rpg-8b48b31f60c1acd63fbe9f35207377209faac012.tar.bz2
HTTPclient: print number of received bytes on error
Diffstat (limited to 'inc/HTTPClient.php')
-rw-r--r--inc/HTTPClient.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php
index 6f00d6d91..772b580b2 100644
--- a/inc/HTTPClient.php
+++ b/inc/HTTPClient.php
@@ -628,8 +628,8 @@ class HTTPClient {
$time_used = $this->_time() - $this->start;
if ($time_used > $this->timeout)
throw new HTTPClientException(
- sprintf('Timeout while reading %s (%.3fs)', $message, $time_used),
- -100);
+ sprintf('Timeout while reading %s after %d bytes (%.3fs)', $message,
+ strlen($r_data), $time_used), -100);
if(feof($socket)) {
if(!$ignore_eof)
throw new HTTPClientException("Premature End of File (socket) while reading $message");