PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Web Services » SOAP » Bug #300

Proxy username/password not enabled in WSDL.php

Details

Submitted2003-11-26 13:21 UTC
Frommarius at disputable dot org
Assignedarnaud
StatusClosed
PackageSOAP
PHP Version4.3.3
OSWin NT
Roadmaps(Not assigned)

Comments

[2003-11-26 13:21 UTC] marius at disputable dot org

Description:
------------
After a few hundred times of trying to connect to a WSDL source outside our corporate firewall - and even hacking a simple proxy script for local access - I discovered a bug in the proxy authentication process in WSDL.php.

It seems the proxy username/password isn't set in the get() method. After checking the documentation for HTTP_Request, I added one line in WSDL.php, which did the trick

Reproduce code:
---------------
Old code:
if (isset($proxy_params['proxy_user']) && isset($proxy_params['proxy_pass'])) {
$rq->setBasicAuth($proxy_params['proxy_user'], $proxy_params['proxy_pass']);
}

New code:
if (isset($proxy_params['proxy_user']) && isset($proxy_params['proxy_pass'])) {
$rq->setBasicAuth($proxy_params['proxy_user'], $proxy_params['proxy_pass']);
/* Added new line to _really_ enable proxying */
$rq->setProxy($proxy_params["proxy_host"],$proxy_params["proxy_port"],$proxy_params["proxy_user"],$proxy_params["proxy_pass"]);
}