{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/6263","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/6263/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/6263/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/6263/events","html_url":"https://github.com/facebook/hhvm/issues/6263","id":106811036,"number":6263,"title":"Http Headers set within SoapClient are not interpreted","user":{"login":"tudor2004","id":2884281,"avatar_url":"https://avatars.githubusercontent.com/u/2884281?v=3","gravatar_id":"","url":"https://api.github.com/users/tudor2004","html_url":"https://github.com/tudor2004","followers_url":"https://api.github.com/users/tudor2004/followers","following_url":"https://api.github.com/users/tudor2004/following{/other_user}","gists_url":"https://api.github.com/users/tudor2004/gists{/gist_id}","starred_url":"https://api.github.com/users/tudor2004/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tudor2004/subscriptions","organizations_url":"https://api.github.com/users/tudor2004/orgs","repos_url":"https://api.github.com/users/tudor2004/repos","events_url":"https://api.github.com/users/tudor2004/events{/privacy}","received_events_url":"https://api.github.com/users/tudor2004/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/hhvm/labels/php5%20incompatibility","name":"php5 incompatibility","color":"837ced"},{"url":"https://api.github.com/repos/facebook/hhvm/labels/probably%20easy","name":"probably easy","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-09-16T16:32:17Z","updated_at":"2015-11-25T20:22:30Z","closed_at":null,"body":"It seems that http headers set into the stream_context value of the SoapClient $options are not interpreted and send to the remote server. Below are two examples that can be used as test: \r\n```php\r\n<?php\r\n/** Use this as client **/\r\n$options = array(\r\n    'location' => 'http://testing.dev/soap_server.php',\r\n    'uri' => 'http://testing.dev'\r\n);\r\n\r\n$httpHeader = 'MY-HEADER: TEST';\r\n\r\n$options['stream_context'] = stream_context_create(array('http' => array('header' => $httpHeader)));\r\n\r\n$client = new SoapClient(NULL, $options);\r\n\r\ntry\r\n{\r\n\techo $client->__soapCall('hello', array());\r\n}\r\ncatch(Exception $e)\r\n{\r\n\techo $e->getMessage();\r\n}\r\n```\r\n\r\n```php\r\n<?php\r\n/** Use this as server **/\r\n\r\nclass MyAPI\r\n{\r\n\tfunction hello()\r\n\t{\r\n\t\treturn var_export(getallheaders(), true);\r\n\t}\r\n}\r\n\r\n$options=array('uri'=>'http://testing.dev');\r\n\r\n$server = new SoapServer(NULL,$options);\r\n$server->setClass('MyAPI');\r\n$server->handle();\r\n```\r\n\r\nUsing `sudo tcpdump -A -n -s 2024  dst port 80` listen to all outgoing requests. Under PHP the headers all visible and sent, under hhvm the headers are not sent. Currently testing under HHVM 3.9.1"},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/159722656","html_url":"https://github.com/facebook/hhvm/issues/6263#issuecomment-159722656","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/6263","id":159722656,"user":{"login":"aszekely","id":4932881,"avatar_url":"https://avatars.githubusercontent.com/u/4932881?v=3","gravatar_id":"","url":"https://api.github.com/users/aszekely","html_url":"https://github.com/aszekely","followers_url":"https://api.github.com/users/aszekely/followers","following_url":"https://api.github.com/users/aszekely/following{/other_user}","gists_url":"https://api.github.com/users/aszekely/gists{/gist_id}","starred_url":"https://api.github.com/users/aszekely/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aszekely/subscriptions","organizations_url":"https://api.github.com/users/aszekely/orgs","repos_url":"https://api.github.com/users/aszekely/repos","events_url":"https://api.github.com/users/aszekely/events{/privacy}","received_events_url":"https://api.github.com/users/aszekely/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T20:22:30Z","updated_at":"2015-11-25T20:22:30Z","body":"@SiebelsTim Hey Tim! great news and if i'm allowed to say: good job! Let's talk tomorrow. I will be on the channel."}}