{"action":"created","comment":{"url":"https://api.github.com/repos/kennethreitz/requests/pulls/comments/60277293","id":60277293,"diff_hunk":"@@ -315,6 +315,26 @@ def test_headers_on_session_with_None_are_not_sent(self, httpbin):\n         prep = ses.prepare_request(req)\n         assert 'Accept-Encoding' not in prep.headers\n \n+    def test_headers_preserve_order(self, httpbin):\n+        \"\"\"Preserve order when headers provided as OrderedDict.\"\"\"\n+        ses = requests.Session()\n+        ses.headers = OrderedDict()","path":"tests/test_requests.py","position":7,"original_position":7,"commit_id":"b1a7dcd79915ec7a58043031da432b5841d4d8ec","original_commit_id":"c8a0fc6aa2131c9bfa7ac3903c01d522fca3d346","user":{"login":"sigmavirus24","id":240830,"avatar_url":"https://avatars.githubusercontent.com/u/240830?v=3","gravatar_id":"","url":"https://api.github.com/users/sigmavirus24","html_url":"https://github.com/sigmavirus24","followers_url":"https://api.github.com/users/sigmavirus24/followers","following_url":"https://api.github.com/users/sigmavirus24/following{/other_user}","gists_url":"https://api.github.com/users/sigmavirus24/gists{/gist_id}","starred_url":"https://api.github.com/users/sigmavirus24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigmavirus24/subscriptions","organizations_url":"https://api.github.com/users/sigmavirus24/orgs","repos_url":"https://api.github.com/users/sigmavirus24/repos","events_url":"https://api.github.com/users/sigmavirus24/events{/privacy}","received_events_url":"https://api.github.com/users/sigmavirus24/received_events","type":"User","site_admin":false},"body":"People might use that, or they might use a list of tuples (which holds the same benefit).","created_at":"2016-04-19T17:47:04Z","updated_at":"2016-04-19T17:47:04Z","html_url":"https://github.com/kennethreitz/requests/pull/3096#discussion_r60277293","pull_request_url":"https://api.github.com/repos/kennethreitz/requests/pulls/3096","_links":{"self":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/comments/60277293"},"html":{"href":"https://github.com/kennethreitz/requests/pull/3096#discussion_r60277293"},"pull_request":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3096"}}},"pull_request":{"url":"https://api.github.com/repos/kennethreitz/requests/pulls/3096","id":66512353,"html_url":"https://github.com/kennethreitz/requests/pull/3096","diff_url":"https://github.com/kennethreitz/requests/pull/3096.diff","patch_url":"https://github.com/kennethreitz/requests/pull/3096.patch","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/3096","number":3096,"state":"open","locked":false,"title":"Change _store of CaseInsensitiveDict to OrderedDict","user":{"login":"piotrjurkiewicz","id":2237894,"avatar_url":"https://avatars.githubusercontent.com/u/2237894?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrjurkiewicz","html_url":"https://github.com/piotrjurkiewicz","followers_url":"https://api.github.com/users/piotrjurkiewicz/followers","following_url":"https://api.github.com/users/piotrjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/piotrjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/piotrjurkiewicz/orgs","repos_url":"https://api.github.com/users/piotrjurkiewicz/repos","events_url":"https://api.github.com/users/piotrjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/piotrjurkiewicz/received_events","type":"User","site_admin":false},"body":"This will preserve order of request headers when passed to request method as `OrderedDict`.\r\n\r\nCloses #3038.","created_at":"2016-04-14T16:15:41Z","updated_at":"2016-04-19T17:47:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"219c1e4ce5839d143126ea6b0183090dcc99b0f5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kennethreitz/requests/pulls/3096/commits","review_comments_url":"https://api.github.com/repos/kennethreitz/requests/pulls/3096/comments","review_comment_url":"https://api.github.com/repos/kennethreitz/requests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/3096/comments","statuses_url":"https://api.github.com/repos/kennethreitz/requests/statuses/b1a7dcd79915ec7a58043031da432b5841d4d8ec","head":{"label":"piotrjurkiewicz:master","ref":"master","sha":"b1a7dcd79915ec7a58043031da432b5841d4d8ec","user":{"login":"piotrjurkiewicz","id":2237894,"avatar_url":"https://avatars.githubusercontent.com/u/2237894?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrjurkiewicz","html_url":"https://github.com/piotrjurkiewicz","followers_url":"https://api.github.com/users/piotrjurkiewicz/followers","following_url":"https://api.github.com/users/piotrjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/piotrjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/piotrjurkiewicz/orgs","repos_url":"https://api.github.com/users/piotrjurkiewicz/repos","events_url":"https://api.github.com/users/piotrjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/piotrjurkiewicz/received_events","type":"User","site_admin":false},"repo":{"id":56251387,"name":"requests","full_name":"piotrjurkiewicz/requests","owner":{"login":"piotrjurkiewicz","id":2237894,"avatar_url":"https://avatars.githubusercontent.com/u/2237894?v=3","gravatar_id":"","url":"https://api.github.com/users/piotrjurkiewicz","html_url":"https://github.com/piotrjurkiewicz","followers_url":"https://api.github.com/users/piotrjurkiewicz/followers","following_url":"https://api.github.com/users/piotrjurkiewicz/following{/other_user}","gists_url":"https://api.github.com/users/piotrjurkiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/piotrjurkiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piotrjurkiewicz/subscriptions","organizations_url":"https://api.github.com/users/piotrjurkiewicz/orgs","repos_url":"https://api.github.com/users/piotrjurkiewicz/repos","events_url":"https://api.github.com/users/piotrjurkiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/piotrjurkiewicz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/piotrjurkiewicz/requests","description":"Python HTTP Requests for Humans™","fork":true,"url":"https://api.github.com/repos/piotrjurkiewicz/requests","forks_url":"https://api.github.com/repos/piotrjurkiewicz/requests/forks","keys_url":"https://api.github.com/repos/piotrjurkiewicz/requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/piotrjurkiewicz/requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/piotrjurkiewicz/requests/teams","hooks_url":"https://api.github.com/repos/piotrjurkiewicz/requests/hooks","issue_events_url":"https://api.github.com/repos/piotrjurkiewicz/requests/issues/events{/number}","events_url":"https://api.github.com/repos/piotrjurkiewicz/requests/events","assignees_url":"https://api.github.com/repos/piotrjurkiewicz/requests/assignees{/user}","branches_url":"https://api.github.com/repos/piotrjurkiewicz/requests/branches{/branch}","tags_url":"https://api.github.com/repos/piotrjurkiewicz/requests/tags","blobs_url":"https://api.github.com/repos/piotrjurkiewicz/requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/piotrjurkiewicz/requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/piotrjurkiewicz/requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/piotrjurkiewicz/requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/piotrjurkiewicz/requests/statuses/{sha}","languages_url":"https://api.github.com/repos/piotrjurkiewicz/requests/languages","stargazers_url":"https://api.github.com/repos/piotrjurkiewicz/requests/stargazers","contributors_url":"https://api.github.com/repos/piotrjurkiewicz/requests/contributors","subscribers_url":"https://api.github.com/repos/piotrjurkiewicz/requests/subscribers","subscription_url":"https://api.github.com/repos/piotrjurkiewicz/requests/subscription","commits_url":"https://api.github.com/repos/piotrjurkiewicz/requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/piotrjurkiewicz/requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/piotrjurkiewicz/requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/piotrjurkiewicz/requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/piotrjurkiewicz/requests/contents/{+path}","compare_url":"https://api.github.com/repos/piotrjurkiewicz/requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/piotrjurkiewicz/requests/merges","archive_url":"https://api.github.com/repos/piotrjurkiewicz/requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/piotrjurkiewicz/requests/downloads","issues_url":"https://api.github.com/repos/piotrjurkiewicz/requests/issues{/number}","pulls_url":"https://api.github.com/repos/piotrjurkiewicz/requests/pulls{/number}","milestones_url":"https://api.github.com/repos/piotrjurkiewicz/requests/milestones{/number}","notifications_url":"https://api.github.com/repos/piotrjurkiewicz/requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/piotrjurkiewicz/requests/labels{/name}","releases_url":"https://api.github.com/repos/piotrjurkiewicz/requests/releases{/id}","deployments_url":"https://api.github.com/repos/piotrjurkiewicz/requests/deployments","created_at":"2016-04-14T16:03:59Z","updated_at":"2016-04-14T16:04:02Z","pushed_at":"2016-04-16T20:21:20Z","git_url":"git://github.com/piotrjurkiewicz/requests.git","ssh_url":"git@github.com:piotrjurkiewicz/requests.git","clone_url":"https://github.com/piotrjurkiewicz/requests.git","svn_url":"https://github.com/piotrjurkiewicz/requests","homepage":"python-requests.org","size":6967,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kennethreitz:master","ref":"master","sha":"4a716e0dfc6e1437c4b81b4e5db84a6c03e9f3d4","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},"repo":{"id":1362490,"name":"requests","full_name":"kennethreitz/requests","owner":{"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},"private":false,"html_url":"https://github.com/kennethreitz/requests","description":"Python HTTP Requests for Humans™","fork":false,"url":"https://api.github.com/repos/kennethreitz/requests","forks_url":"https://api.github.com/repos/kennethreitz/requests/forks","keys_url":"https://api.github.com/repos/kennethreitz/requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kennethreitz/requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kennethreitz/requests/teams","hooks_url":"https://api.github.com/repos/kennethreitz/requests/hooks","issue_events_url":"https://api.github.com/repos/kennethreitz/requests/issues/events{/number}","events_url":"https://api.github.com/repos/kennethreitz/requests/events","assignees_url":"https://api.github.com/repos/kennethreitz/requests/assignees{/user}","branches_url":"https://api.github.com/repos/kennethreitz/requests/branches{/branch}","tags_url":"https://api.github.com/repos/kennethreitz/requests/tags","blobs_url":"https://api.github.com/repos/kennethreitz/requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kennethreitz/requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kennethreitz/requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/kennethreitz/requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kennethreitz/requests/statuses/{sha}","languages_url":"https://api.github.com/repos/kennethreitz/requests/languages","stargazers_url":"https://api.github.com/repos/kennethreitz/requests/stargazers","contributors_url":"https://api.github.com/repos/kennethreitz/requests/contributors","subscribers_url":"https://api.github.com/repos/kennethreitz/requests/subscribers","subscription_url":"https://api.github.com/repos/kennethreitz/requests/subscription","commits_url":"https://api.github.com/repos/kennethreitz/requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/kennethreitz/requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/kennethreitz/requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/kennethreitz/requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/kennethreitz/requests/contents/{+path}","compare_url":"https://api.github.com/repos/kennethreitz/requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kennethreitz/requests/merges","archive_url":"https://api.github.com/repos/kennethreitz/requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kennethreitz/requests/downloads","issues_url":"https://api.github.com/repos/kennethreitz/requests/issues{/number}","pulls_url":"https://api.github.com/repos/kennethreitz/requests/pulls{/number}","milestones_url":"https://api.github.com/repos/kennethreitz/requests/milestones{/number}","notifications_url":"https://api.github.com/repos/kennethreitz/requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kennethreitz/requests/labels{/name}","releases_url":"https://api.github.com/repos/kennethreitz/requests/releases{/id}","deployments_url":"https://api.github.com/repos/kennethreitz/requests/deployments","created_at":"2011-02-13T18:38:17Z","updated_at":"2016-04-19T16:23:30Z","pushed_at":"2016-04-18T09:10:18Z","git_url":"git://github.com/kennethreitz/requests.git","ssh_url":"git@github.com:kennethreitz/requests.git","clone_url":"https://github.com/kennethreitz/requests.git","svn_url":"https://github.com/kennethreitz/requests","homepage":"python-requests.org","size":9346,"stargazers_count":18611,"watchers_count":18611,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3250,"mirror_url":null,"open_issues_count":83,"forks":3250,"open_issues":83,"watchers":18611,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3096"},"html":{"href":"https://github.com/kennethreitz/requests/pull/3096"},"issue":{"href":"https://api.github.com/repos/kennethreitz/requests/issues/3096"},"comments":{"href":"https://api.github.com/repos/kennethreitz/requests/issues/3096/comments"},"review_comments":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3096/comments"},"review_comment":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3096/commits"},"statuses":{"href":"https://api.github.com/repos/kennethreitz/requests/statuses/b1a7dcd79915ec7a58043031da432b5841d4d8ec"}}}}