Edit report at https://bugs.php.net/bug.php?id=60887&edit=1

 ID:                 60887
 Comment by:         carloschilazo at gmail dot com
 Reported by:        mail at tomsommer dot dk
 Summary:            SoapClient ignores user_agent option and sends no
                     User-Agent header
 Status:             Open
 Type:               Bug
 Package:            SOAP related
 PHP Version:        5.3.9
 Block user comment: N
 Private report:     N

 New Comment:

I could not reproduce your problem, using PHP 5.3.9 (linux) was able to send a 
request with user_agent header set


I captured with WireShark.... could you please try to:
a) capture with another program (maybe)
b) make sure that on the other end , the user_agent is not being stripped

or provide more info


Previous Comments:
------------------------------------------------------------------------
[2012-01-26 07:16:20] mail at tomsommer dot dk

Workaround is:

$opts = array(
  'http'=>array(
    'user_agent' => 'foo'
  )
);

$context = stream_context_create($opts);
$client = new SoapClient('http://www.example.com/', array('stream_context' => 
$context));

------------------------------------------------------------------------
[2012-01-25 20:55:06] mail at tomsommer dot dk

The receiving server only receive the following headers:

GET / HTTP/1.1
Host: www.example.com
Connection: close

Checked with tcpdump

------------------------------------------------------------------------
[2012-01-25 20:45:55] mail at tomsommer dot dk

Description:
------------
The SoapClient ignores the "user_agent" option, and sends no User-Agent at all.

Test script:
---------------
$client = new SoapClient('http://www.example.com/', array('user_agent' => 
'foo'));


Expected result:
----------------
User-Agent header on the remote server

Actual result:
--------------
No User-Agent header on the remote server


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=60887&edit=1

Reply via email to