cvs: php-src /pear/PEAR Remote.php
| From: | Pierre-Alain Joye | Date: | Thu, 16 Oct 2003 18:16:39 +0000 |
| Subject: | cvs: php-src /pear/PEAR Remote.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-13664@lists.php.net to get a copy of this message | ||
pajoye Thu Oct 16 14:16:39 2003 EDT
Modified files:
/php-src/pear/PEAR Remote.php
Log:
- Fix RPC call without proxy (silence warnings¬ices)
nota bene: the proxy codes should be cleaned, one day ;)
Index: php-src/pear/PEAR/Remote.php
diff -u php-src/pear/PEAR/Remote.php:1.46 php-src/pear/PEAR/Remote.php:1.47
--- php-src/pear/PEAR/Remote.php:1.46 Mon Aug 4 07:18:26 2003
+++ php-src/pear/PEAR/Remote.php Thu Oct 16 14:16:38 2003
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@php.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Remote.php,v 1.46 2003/08/04 11:18:26 cox Exp $
+// $Id: Remote.php,v 1.47 2003/10/16 18:16:38 pajoye Exp $
require_once 'PEAR.php';
require_once 'PEAR/Config.php';
@@ -209,7 +209,9 @@
$proxy_user = @$proxy['user'];
$proxy_pass = @$proxy['pass'];
$fp = @fsockopen($proxy_host, $proxy_port);
+ $use_proxy = true;
} else {
+ $use_proxy = false;
$fp = @fsockopen($server_host, $server_port);
}
if (!$fp && $http_proxy) {
@@ -234,7 +236,7 @@
$maxAge = '';
};
- if ($proxy_host != '' && $proxy_user != '') {
+ if ($use_proxy && $proxy_host != '' && $proxy_user !=
'') {
$req_headers .= 'Proxy-Authorization: Basic '
.base64_encode($proxy_user.':'.$proxy_pass)
."\r\n";
@@ -247,7 +249,7 @@
var_dump($request);
}
- if ($proxy_host != '') {
+ if ($use_proxy && $proxy_host != '') {
$post_string = "POST http://".$server_host;
if ($proxy_port > '') {
$post_string .= ':'.$server_port;