title: PHP SoapClient(): send "User-Agent" and "Accept" HTTP Header
body: <p>Due to a firewall audit, requests must always have the "UserAgent" and "Accept" header.</p>
  
  <p>I tried this:</p>
  
  <pre><code>$soapclient = new soapclient('http://www.soap.com/soap.php?wsdl',
      array('stream_context' =&gt; stream_context_create(
          array(
              'http'=&gt; array(
                  'user_agent' =&gt; 'PHP/SOAP',
                  'accept' =&gt; 'application/xml')
              )
          )
      )
  );
  </code></pre>
  
  <p>the request received by the server soap</p>
  
  <pre><code>GET /soap.php?wsdl HTTP/1.1
  Host: www.soap.com
  User-Agent: PHP/SOAP
  Connection: close
  </code></pre>
  
  <p>the expected result</p>
  
  <pre><code>GET /soap.php?wsdl HTTP/1.1
  Host: www.soap.com
  Accept application/xml
  User-Agent: PHP/SOAP
  Connection: close
  </code></pre>
  
  <p>Why "Accept" has not been sent? "User-Agent" works!</p>