From: <ru...@us...> - 2009-07-14 07:11:41
|
Revision: 7024 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7024&view=rev Author: rurban Date: 2009-07-14 07:11:38 +0000 (Tue, 14 Jul 2009) Log Message: ----------- Debugging: Warn about empty response Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2009-07-14 07:10:47 UTC (rev 7023) +++ trunk/lib/HttpClient.php 2009-07-14 07:11:38 UTC (rev 7024) @@ -148,6 +148,10 @@ if ($atStart) { // Deal with first line of returned data $atStart = false; + if ($line === false) { + $this->errormsg = "Empty ". $this->method. " response"; + return false; + } if (!preg_match('/HTTP\/(\\d\\.\\d)\\s*(\\d+)\\s*(.*)/', $line, $m)) { $this->errormsg = "Status code line invalid: ".htmlentities($line); $this->debug($this->errormsg); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |