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. |
From: <var...@us...> - 2014-11-08 16:21:44
|
Revision: 9289 http://sourceforge.net/p/phpwiki/code/9289 Author: vargenau Date: 2014-11-08 16:21:41 +0000 (Sat, 08 Nov 2014) Log Message: ----------- Add break; add static Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2014-11-08 16:20:04 UTC (rev 9288) +++ trunk/lib/HttpClient.php 2014-11-08 16:21:41 UTC (rev 9289) @@ -120,10 +120,13 @@ switch ($errno) { case -3: $this->errormsg = 'Socket creation failed (-3)'; + break; case -4: $this->errormsg = 'DNS lookup failure (-4)'; + break; case -5: $this->errormsg = 'Connection refused or timed out (-5)'; + break; default: $this->errormsg = 'Connection failed (' . $errno . ')'; $this->errormsg .= ' ' . $errstr; @@ -166,9 +169,9 @@ $this->debug($this->errormsg); return false; } - $http_version = $m[1]; // not used + // $http_version = $m[1]; // not used $this->status = $m[2]; - $status_string = $m[3]; // not used + $status_string = $m[3]; $this->debug(trim($line)); continue; } @@ -390,7 +393,7 @@ } // "Quick" static methods - function quickGet($url) + static function quickGet($url) { $bits = parse_url($url); $host = $bits['host']; @@ -407,7 +410,7 @@ } } - function quickPost($url, $data) + static function quickPost($url, $data) { $bits = parse_url($url); $host = $bits['host']; @@ -421,7 +424,7 @@ } } - function debug($msg, $object = false) + function debug($msg, $object = null) { if ($this->debug) { print '<div style="border: 1px solid red; padding: 0.5em; margin: 0.5em;"><strong>HttpClient Debug:</strong> ' . $msg; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2023-03-28 14:53:41
|
Revision: 11037 http://sourceforge.net/p/phpwiki/code/11037 Author: vargenau Date: 2023-03-28 14:53:38 +0000 (Tue, 28 Mar 2023) Log Message: ----------- lib/HttpClient.php: SPDX-License-Identifier: Artistic-1.0 instead of Artistic-1.0+ Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2023-02-27 14:05:49 UTC (rev 11036) +++ trunk/lib/HttpClient.php 2023-03-28 14:53:38 UTC (rev 11037) @@ -5,7 +5,7 @@ * * This file is part of PhpWiki. * - * SPDX-License-Identifier: Artistic-1.0+ + * SPDX-License-Identifier: Artistic-1.0 * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2016-07-21 10:16:09
|
Revision: 9897 http://sourceforge.net/p/phpwiki/code/9897 Author: vargenau Date: 2016-07-21 10:16:06 +0000 (Thu, 21 Jul 2016) Log Message: ----------- Use __construct Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2016-07-21 09:56:45 UTC (rev 9896) +++ trunk/lib/HttpClient.php 2016-07-21 10:16:06 UTC (rev 9897) @@ -49,7 +49,7 @@ public $redirect_count = 0; public $cookie_host = ''; - function HttpClient($host = 'localhost', $port = 80) + function __construct($host = 'localhost', $port = 80) { $this->host = $host; $this->port = $port; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2020-12-04 17:14:00
|
Revision: 10174 http://sourceforge.net/p/phpwiki/code/10174 Author: vargenau Date: 2020-12-04 17:13:59 +0000 (Fri, 04 Dec 2020) Log Message: ----------- replace "Artistic-1.0+" by "(Artistic-1.0 OR Artistic-2.0)"; remove wrong header Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2020-12-04 17:06:08 UTC (rev 10173) +++ trunk/lib/HttpClient.php 2020-12-04 17:13:59 UTC (rev 10174) @@ -5,22 +5,8 @@ * * This file is part of PhpWiki. * - * PhpWiki is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * SPDX-License-Identifier: (Artistic-1.0 OR Artistic-2.0) * - * PhpWiki is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with PhpWiki; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * SPDX-License-Identifier: Artistic-1.0+ - * */ /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <var...@us...> - 2021-05-07 11:03:00
|
Revision: 10277 http://sourceforge.net/p/phpwiki/code/10277 Author: vargenau Date: 2021-05-07 11:02:55 +0000 (Fri, 07 May 2021) Log Message: ----------- SPDX-License-Identifier: Artistic-1.0+ Modified Paths: -------------- trunk/lib/HttpClient.php Modified: trunk/lib/HttpClient.php =================================================================== --- trunk/lib/HttpClient.php 2021-03-01 13:47:42 UTC (rev 10276) +++ trunk/lib/HttpClient.php 2021-05-07 11:02:55 UTC (rev 10277) @@ -5,7 +5,7 @@ * * This file is part of PhpWiki. * - * SPDX-License-Identifier: (Artistic-1.0 OR Artistic-2.0) + * SPDX-License-Identifier: Artistic-1.0+ * */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |