#21838 [Asn->Csd]: no error reporting on timed out read()
| From: | arnaud@php.net | Date: | Sun, 27 Jul 2003 17:41:15 +0000 |
| Subject: | #21838 [Asn->Csd]: no error reporting on timed out read() | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-18811@lists.php.net to get a copy of this message | ||
ID: 21838
Updated by: arnaud@php.net
Reported By: pavlomr at hotmail dot com
-Status: Assigned
+Status: Closed
Bug Type: PEAR related
Operating System: SuSE Linux 7.3
PHP Version: 4.3.0
Assigned To: shane
New Comment:
This bug has been fixed in CVS.
In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.
In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2003-07-27 10:40:56] nicos@php.net
sure, but do we want to report this error?
Btw are you sure that the timeout doesn't print out an error?
E_NOTICE or E_WARNING ?
Need feedback because I can't reproduce it.
------------------------------------------------------------------------
[2003-07-21 10:49:26] meebey@php.net
the current version has a timeout error handling but no timeout error
reporting, this patch would do it..
------------------------------------------------------------------------
[2003-05-26 08:42:35] arnaud@php.net
Just saw this old bug report. This was corrected in a recent release
iirc.
------------------------------------------------------------------------
[2003-01-23 04:52:38] pavlomr at hotmail dot com
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);
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21838&edit=1