PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

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"]);
}