{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/3038","repository_url":"https://api.github.com/repos/kennethreitz/requests","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/3038/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/3038/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/3038/events","html_url":"https://github.com/kennethreitz/requests/issues/3038","id":139189046,"number":3038,"title":"Order of request headers should be preserved when sent to origin server","user":{"login":"davidfstr","id":764688,"avatar_url":"https://avatars.githubusercontent.com/u/764688?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfstr","html_url":"https://github.com/davidfstr","followers_url":"https://api.github.com/users/davidfstr/followers","following_url":"https://api.github.com/users/davidfstr/following{/other_user}","gists_url":"https://api.github.com/users/davidfstr/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfstr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfstr/subscriptions","organizations_url":"https://api.github.com/users/davidfstr/orgs","repos_url":"https://api.github.com/users/davidfstr/repos","events_url":"https://api.github.com/users/davidfstr/events{/privacy}","received_events_url":"https://api.github.com/users/davidfstr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-03-08T06:04:36Z","updated_at":"2016-03-08T10:05:44Z","closed_at":null,"body":"#### Summary\r\n\r\nIf I made a request with code that looks like:\r\n\r\n```\r\n    requests.get(\r\n        'http://127.0.0.1:8765/',\r\n        headers=OrderedDict([\r\n            ('X-Header-1', 'ignoreme'),\r\n            ('X-Header-2', 'ignoreme'),\r\n            ('X-Header-3', 'ignoreme'),\r\n            ('X-Header-4', 'ignoreme'),\r\n        ])\r\n    )\r\n```\r\n\r\nI expect the recipient HTTP server to receive the X headers in the same order at they were listed in the code above. However I receive them in a random non-deterministic order.\r\n\r\n#### Environment\r\n\r\n* Requests 2.9.1\r\n* Python 3.4.1\r\n\r\n#### Repro Steps\r\n\r\n* Download files in the following gist: https://gist.github.com/davidfstr/0dca5a133fa397cadd92\r\n* Run reflect_server.py in terminal window 1.\r\n* Run reflect_client.py in terminal window 2.\r\n\r\n#### Expected Results\r\n\r\n* Terminal window 1 shows a request made with the X headers in consecutive order from 1 to 4.\r\n\r\n#### Actual Results\r\n\r\n* Terminal window 1 shows a request made with the X headers in random non-deterministic order.\r\n\r\n#### Notes\r\n\r\nThe following closed older issues suggest that preservation of order is indeed important:\r\n\r\n* https://github.com/kennethreitz/requests/issues/284, https://github.com/kennethreitz/requests/issues/179\r\n* https://github.com/kennethreitz/requests/issues/2668"},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/193700801","html_url":"https://github.com/kennethreitz/requests/issues/3038#issuecomment-193700801","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/3038","id":193700801,"user":{"login":"kennethreitz","id":119893,"avatar_url":"https://avatars.githubusercontent.com/u/119893?v=3","gravatar_id":"","url":"https://api.github.com/users/kennethreitz","html_url":"https://github.com/kennethreitz","followers_url":"https://api.github.com/users/kennethreitz/followers","following_url":"https://api.github.com/users/kennethreitz/following{/other_user}","gists_url":"https://api.github.com/users/kennethreitz/gists{/gist_id}","starred_url":"https://api.github.com/users/kennethreitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kennethreitz/subscriptions","organizations_url":"https://api.github.com/users/kennethreitz/orgs","repos_url":"https://api.github.com/users/kennethreitz/repos","events_url":"https://api.github.com/users/kennethreitz/events{/privacy}","received_events_url":"https://api.github.com/users/kennethreitz/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T10:05:44Z","updated_at":"2016-03-08T10:05:44Z","body":"Yeah, it was always a \"secret\" feature, so I prob chose to abandon it during the refactor. "}}