|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-05-26 08:42 UTC] arnaud@php.net
[2003-07-21 10:49 UTC] meebey@php.net
[2003-07-27 10:40 UTC] nicos@php.net
[2003-07-27 12:41 UTC] arnaud@php.net
[2003-07-27 12:43 UTC] arnaud@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 16:00:02 2025 UTC |
I have encountered mysterious time-to-time "Invalid HTTP Response" errors on slow links. The problem was socket read() timeout in Transport/HTTP.php I think reporting timeouts as own soap fault helps in debugging SOAP-based applications. I propose next patch for Transport/HTTP.php : --- HTTP.php.b 2003-01-23 12:19:53.000000000 +0200 +++ HTTP.php 2003-01-23 12:25:57.000000000 +0200 @@ -307,9 +307,15 @@ // get reponse // XXX time consumer - while ($data = fread($fp, 32768)) { - $this->incoming_payload .= $data; - } + do { + $data=fread($fp,4096); + $_tmp_status=socket_get_status($fp); + if ($_tmp_status["timed_out"]) { + return $this->_raiseSoapFault("Timed out read from $host"); + } else { + $this->incoming_payload.=$data; + } + } while ( !$_tmp_status["eof"] ); fclose($fp);