diff options
author | Pierre Joye <pajoye@php.net> | 2003-10-16 18:16:38 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2003-10-16 18:16:38 +0000 |
commit | 64e499aaefc900b0e32a52bf13307f1d18957f8e (patch) | |
tree | e750731ea2d2fa885f97134e3ce267bcc85ad564 | |
parent | 1459361c3e6b1e346725809fdc41c36b798bd43f (diff) | |
download | php-git-64e499aaefc900b0e32a52bf13307f1d18957f8e.tar.gz |
- Fix RPC call without proxy (silence warnings¬ices)
nota bene: the proxy codes should be cleaned, one day ;)
-rw-r--r-- | pear/PEAR/Remote.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pear/PEAR/Remote.php b/pear/PEAR/Remote.php index eca2c38409..b49b674d2c 100644 --- a/pear/PEAR/Remote.php +++ b/pear/PEAR/Remote.php @@ -209,7 +209,9 @@ class PEAR_Remote extends PEAR $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 @@ class PEAR_Remote extends PEAR $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 @@ class PEAR_Remote extends PEAR var_dump($request); } - if ($proxy_host != '') { + if ($use_proxy && $proxy_host != '') { $post_string = "POST http://".$server_host; if ($proxy_port > '') { $post_string .= ':'.$server_port; |