Home » Web Services » SOAP » Bug #300
Proxy username/password not enabled in WSDL.php
Details
| Submitted | 2003-11-26 13:21 UTC |
|---|---|
| From | marius at disputable dot org |
| Assigned | arnaud |
| Status | Closed |
| Package | SOAP |
| PHP Version | 4.3.3 |
| OS | Win 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"]);
}