|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 16:00:01 2025 UTC |
Description: ------------ In a manner similar to #50489, the "user_agent" (or default PHP User-Agent string) should be included in the HTTP headers when connecting through a proxy server. Some proxy servers refuse tunneling unless a User-Agent is provided, but the SOAP extension doesn't include one event if the "user_agent" value is provided in the option headers. Test script: --------------- <?php $client = new SoapClient("/path/to/some/wsdl.xml", array( 'classmap' => $CLASSMAP, 'trace' => false, 'user_agent' => 'PHP', 'proxy_host' => 'cie-vproxy.cie.etat.lu', 'proxy_port' => 80, ) ); /* ... */ $client->request() Expected result: ---------------- The script should connect to the proxy server and send the request with a "User-Agent: PHP" header. Actual result: -------------- The request doesn't contain a "User-Agent" header and the proxy refuses to tunnel the request.