{"action":"closed","number":3034,"pull_request":{"url":"https://api.github.com/repos/kennethreitz/requests/pulls/3034","id":61856321,"html_url":"https://github.com/kennethreitz/requests/pull/3034","diff_url":"https://github.com/kennethreitz/requests/pull/3034.diff","patch_url":"https://github.com/kennethreitz/requests/pull/3034.patch","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/3034","number":3034,"state":"closed","locked":false,"title":"Support non-ASCII Reason Phrase as per RFC2616","user":{"login":"erydo","id":447615,"avatar_url":"https://avatars.githubusercontent.com/u/447615?v=3","gravatar_id":"","url":"https://api.github.com/users/erydo","html_url":"https://github.com/erydo","followers_url":"https://api.github.com/users/erydo/followers","following_url":"https://api.github.com/users/erydo/following{/other_user}","gists_url":"https://api.github.com/users/erydo/gists{/gist_id}","starred_url":"https://api.github.com/users/erydo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erydo/subscriptions","organizations_url":"https://api.github.com/users/erydo/orgs","repos_url":"https://api.github.com/users/erydo/repos","events_url":"https://api.github.com/users/erydo/events{/privacy}","received_events_url":"https://api.github.com/users/erydo/received_events","type":"User","site_admin":false},"body":"RFC2616 specifies that header values and reason phrases are encoded in in ISO-8859-1 or RFC2047 (MIME for text). RFC7230, which obsoletes RC2616, recommends treating non-ASCII header values as 'opaque data'.\r\n\r\nIn the case of the Reason Phrase, however, we should try to decode it as described due to its possible/encouraged localization and due to its purpose for display to the user; treating it as 'opaque data' is not useful and prevents its intended use.\r\n\r\nNote that several production servers, including Apache Tomcat, send responses conforming to RFC2616. Servers that respond only in US-ASCII are unaffected by this change. This *only* regresses (by introducing possible encoding errors) for servers that send responses conforming to neither RFC, which I believe are either uncommon or non-existent.\r\n\r\nFixes kennethreitz/requests#3009","created_at":"2016-03-06T21:50:37Z","updated_at":"2016-03-09T21:31:41Z","closed_at":"2016-03-09T21:31:41Z","merged_at":null,"merge_commit_sha":"91ad966223f9ff016a0d48c8530cd7a427c766bd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kennethreitz/requests/pulls/3034/commits","review_comments_url":"https://api.github.com/repos/kennethreitz/requests/pulls/3034/comments","review_comment_url":"https://api.github.com/repos/kennethreitz/requests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/3034/comments","statuses_url":"https://api.github.com/repos/kennethreitz/requests/statuses/6797124ad2facc6515a62dcf6c31e5ebd071fe43","head":{"label":"erydo:fix-latin1-status-reason","ref":"fix-latin1-status-reason","sha":"6797124ad2facc6515a62dcf6c31e5ebd071fe43","user":{"login":"erydo","id":447615,"avatar_url":"https://avatars.githubusercontent.com/u/447615?v=3","gravatar_id":"","url":"https://api.github.com/users/erydo","html_url":"https://github.com/erydo","followers_url":"https://api.github.com/users/erydo/followers","following_url":"https://api.github.com/users/erydo/following{/other_user}","gists_url":"https://api.github.com/users/erydo/gists{/gist_id}","starred_url":"https://api.github.com/users/erydo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erydo/subscriptions","organizations_url":"https://api.github.com/users/erydo/orgs","repos_url":"https://api.github.com/users/erydo/repos","events_url":"https://api.github.com/users/erydo/events{/privacy}","received_events_url":"https://api.github.com/users/erydo/received_events","type":"User","site_admin":false},"repo":{"id":53277945,"name":"requests","full_name":"erydo/requests","owner":{"login":"erydo","id":447615,"avatar_url":"https://avatars.githubusercontent.com/u/447615?v=3","gravatar_id":"","url":"https://api.github.com/users/erydo","html_url":"https://github.com/erydo","followers_url":"https://api.github.com/users/erydo/followers","following_url":"https://api.github.com/users/erydo/following{/other_user}","gists_url":"https://api.github.com/users/erydo/gists{/gist_id}","starred_url":"https://api.github.com/users/erydo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erydo/subscriptions","organizations_url":"https://api.github.com/users/erydo/orgs","repos_url":"https://api.github.com/users/erydo/repos","events_url":"https://api.github.com/users/erydo/events{/privacy}","received_events_url":"https://api.github.com/users/erydo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/erydo/requests","description":"Python HTTP Requests for Humans™","fork":true,"url":"https://api.github.com/repos/erydo/requests","forks_url":"https://api.github.com/repos/erydo/requests/forks","keys_url":"https://api.github.com/repos/erydo/requests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erydo/requests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erydo/requests/teams","hooks_url":"https://api.github.com/repos/erydo/requests/hooks","issue_events_url":"https://api.github.com/repos/erydo/requests/issues/events{/number}","events_url":"https://api.github.com/repos/erydo/requests/events","assignees_url":"https://api.github.com/repos/erydo/requests/assignees{/user}","branches_url":"https://api.github.com/repos/erydo/requests/branches{/branch}","tags_url":"https://api.github.com/repos/erydo/requests/tags","blobs_url":"https://api.github.com/repos/erydo/requests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erydo/requests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erydo/requests/git/refs{/sha}","trees_url":"https://api.github.com/repos/erydo/requests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erydo/requests/statuses/{sha}","languages_url":"https://api.github.com/repos/erydo/requests/languages","stargazers_url":"https://api.github.com/repos/erydo/requests/stargazers","contributors_url":"https://api.github.com/repos/erydo/requests/contributors","subscribers_url":"https://api.github.com/repos/erydo/requests/subscribers","subscription_url":"https://api.github.com/repos/erydo/requests/subscription","commits_url":"https://api.github.com/repos/erydo/requests/commits{/sha}","git_commits_url":"https://api.github.com/repos/erydo/requests/git/commits{/sha}","comments_url":"https://api.github.com/repos/erydo/requests/comments{/number}","issue_comment_url":"https://api.github.com/repos/erydo/requests/issues/comments{/number}","contents_url":"https://api.github.com/repos/erydo/requests/contents/{+path}","compare_url":"https://api.github.com/repos/erydo/requests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erydo/requests/merges","archive_url":"https://api.github.com/repos/erydo/requests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erydo/requests/downloads","issues_url":"https://api.github.com/repos/erydo/requests/issues{/number}","pulls_url":"https://api.github.com/repos/erydo/requests/pulls{/number}","milestones_url":"https://api.github.com/repos/erydo/requests/milestones{/number}","notifications_url":"https://api.github.com/repos/erydo/requests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erydo/requests/labels{/name}","releases_url":"https://api.github.com/repos/erydo/requests/releases{/id}","deployments_url":"https://api.github.com/repos/erydo/requests/deployments","created_at":"2016-03-06T21:47:22Z","updated_at":"2016-03-06T21:47:25Z","pushed_at":"2016-03-06T21:47:47Z","git_url":"git://github.com/erydo/requests.git","ssh_url":"git@github.com:erydo/requests.git","clone_url":"https://github.com/erydo/requests.git","svn_url":"https://github.com/erydo/requests","homepage":"python-requests.org","size":7065,"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":"4f378b0e1a2f5f60e2e57daaec80081483f7150e","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-03-09T20:53:28Z","pushed_at":"2016-03-09T18:09:46Z","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":9563,"stargazers_count":17994,"watchers_count":17994,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3125,"mirror_url":null,"open_issues_count":97,"forks":3125,"open_issues":97,"watchers":17994,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3034"},"html":{"href":"https://github.com/kennethreitz/requests/pull/3034"},"issue":{"href":"https://api.github.com/repos/kennethreitz/requests/issues/3034"},"comments":{"href":"https://api.github.com/repos/kennethreitz/requests/issues/3034/comments"},"review_comments":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3034/comments"},"review_comment":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kennethreitz/requests/pulls/3034/commits"},"statuses":{"href":"https://api.github.com/repos/kennethreitz/requests/statuses/6797124ad2facc6515a62dcf6c31e5ebd071fe43"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":30,"deletions":4,"changed_files":3}}