|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53718 "user_agent" not in HTTP requests for proxied requests, even if set in $options
Submitted: 2011-01-12 11:45 UTC Modified: -
From: scaligo at pt dot lu Assigned:
Status: Open Package: SOAP related
PHP Version: 5.3.5 OS: Any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
14 - 2 = ?
Subscribe to this entry?

 [2011-01-12 11:45 UTC] scaligo at pt dot lu
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:

$client = new SoapClient("/path/to/some/wsdl.xml",
    'classmap' => $CLASSMAP,
    'trace' => false,
    'user_agent' => 'PHP',
    'proxy_host' => '',
    'proxy_port' => 80,

/* ... */


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.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 04:03:38 2021 UTC