{"action":"created","issue":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/1650","labels_url":"https://api.github.com/repos/Codeception/Codeception/issues/1650/labels{/name}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/1650/comments","events_url":"https://api.github.com/repos/Codeception/Codeception/issues/1650/events","html_url":"https://github.com/Codeception/Codeception/issues/1650","id":54580437,"number":1650,"title":"REST.php $I->haveHttpHeader not working as expected","user":{"login":"russellsimpkins","id":139807,"avatar_url":"https://avatars.githubusercontent.com/u/139807?v=3","gravatar_id":"","url":"https://api.github.com/users/russellsimpkins","html_url":"https://github.com/russellsimpkins","followers_url":"https://api.github.com/users/russellsimpkins/followers","following_url":"https://api.github.com/users/russellsimpkins/following{/other_user}","gists_url":"https://api.github.com/users/russellsimpkins/gists{/gist_id}","starred_url":"https://api.github.com/users/russellsimpkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellsimpkins/subscriptions","organizations_url":"https://api.github.com/users/russellsimpkins/orgs","repos_url":"https://api.github.com/users/russellsimpkins/repos","events_url":"https://api.github.com/users/russellsimpkins/events{/privacy}","received_events_url":"https://api.github.com/users/russellsimpkins/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-16T14:25:11Z","updated_at":"2015-01-16T14:37:49Z","closed_at":null,"body":"I noticed that I can not set the Host header using:\r\n```\r\n$I->haveHttpHeader(\"Host\", \"www.expected.com\")\r\n```\r\nWhen I do that, I see in my Apache log files that I'm getting the DNS name I used to make the request instead of the value I used e.g. \"www.expected.com\"\r\n***However*** If I do the following:\r\n```\r\n$I->haveHttpHeader(\" Host\", \"www.expected.com\")\r\n```\r\nI can see the value of \"www.expected.com\" in my Apache logs. \r\n\r\nIs this a bug or a feature? Is this how I need to set header variables?\r\n\r\nI'm using codeceptino 2.0.9 and php 5.5.10\r\n"},"comment":{"url":"https://api.github.com/repos/Codeception/Codeception/issues/comments/70261860","html_url":"https://github.com/Codeception/Codeception/issues/1650#issuecomment-70261860","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/1650","id":70261860,"user":{"login":"hughmandeville","id":672392,"avatar_url":"https://avatars.githubusercontent.com/u/672392?v=3","gravatar_id":"","url":"https://api.github.com/users/hughmandeville","html_url":"https://github.com/hughmandeville","followers_url":"https://api.github.com/users/hughmandeville/followers","following_url":"https://api.github.com/users/hughmandeville/following{/other_user}","gists_url":"https://api.github.com/users/hughmandeville/gists{/gist_id}","starred_url":"https://api.github.com/users/hughmandeville/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughmandeville/subscriptions","organizations_url":"https://api.github.com/users/hughmandeville/orgs","repos_url":"https://api.github.com/users/hughmandeville/repos","events_url":"https://api.github.com/users/hughmandeville/events{/privacy}","received_events_url":"https://api.github.com/users/hughmandeville/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T14:37:49Z","updated_at":"2015-01-16T14:37:49Z","body":"I have the same problem.  PhpBrowser's setHeader and REST's haveHttpHeader work for all other headers, except \"host\".  Seems like Symfony2 or Guzzle is replacing the host header.  Maybe they are calling updateHeader instead of addHeader, which wouldn't overwrite an existing header."}}