{"action":"created","comment":{"url":"https://api.github.com/repos/joestump/python-oauth2/pulls/comments/52585489","id":52585489,"diff_hunk":"@@ -1290,6 +1290,38 @@ def mockrequest(cl, ur, **kw):\n         client.request(uri, 'GET')\n \n     @mock.patch('httplib2.Http.request')\n+    def test_url_with_query_string_body_none(self, mockHttpRequest):\n+        uri = 'http://example.com/foo/bar/?show=thundercats&character=snarf'\n+        client = oauth.Client(self.consumer, None)\n+        random_result = random.randint(1,100)\n+\n+        def mockrequest(cl, ur, **kw):\n+            self.failUnless(cl is client)\n+            self.failUnlessEqual(frozenset(kw.keys()), frozenset(['method', 'body', 'redirections', 'connection_type', 'headers']))\n+            self.failUnlessEqual(kw['body'], None)\n+            self.failUnlessEqual(kw['connection_type'], None)\n+            self.failUnlessEqual(kw['method'], 'GET')\n+            self.failUnlessEqual(kw['redirections'], httplib2.DEFAULT_MAX_REDIRECTS)","path":"tests/test_oauth.py","position":15,"original_position":15,"commit_id":"b5d35d58c0a0fe9eb9f3e0e8af63a72dcf0a2393","original_commit_id":"b5d35d58c0a0fe9eb9f3e0e8af63a72dcf0a2393","user":{"login":"betterdiff","id":11888905,"avatar_url":"https://avatars.githubusercontent.com/u/11888905?v=3","gravatar_id":"","url":"https://api.github.com/users/betterdiff","html_url":"https://github.com/betterdiff","followers_url":"https://api.github.com/users/betterdiff/followers","following_url":"https://api.github.com/users/betterdiff/following{/other_user}","gists_url":"https://api.github.com/users/betterdiff/gists{/gist_id}","starred_url":"https://api.github.com/users/betterdiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/betterdiff/subscriptions","organizations_url":"https://api.github.com/users/betterdiff/orgs","repos_url":"https://api.github.com/users/betterdiff/repos","events_url":"https://api.github.com/users/betterdiff/events{/privacy}","received_events_url":"https://api.github.com/users/betterdiff/received_events","type":"User","site_admin":false},"body":"* E501 line too long (84 > 79 characters)\n","created_at":"2016-02-11T10:49:23Z","updated_at":"2016-02-11T10:49:23Z","html_url":"https://github.com/joestump/python-oauth2/pull/138#discussion_r52585489","pull_request_url":"https://api.github.com/repos/joestump/python-oauth2/pulls/138","_links":{"self":{"href":"https://api.github.com/repos/joestump/python-oauth2/pulls/comments/52585489"},"html":{"href":"https://github.com/joestump/python-oauth2/pull/138#discussion_r52585489"},"pull_request":{"href":"https://api.github.com/repos/joestump/python-oauth2/pulls/138"}}},"pull_request":{"url":"https://api.github.com/repos/joestump/python-oauth2/pulls/138","id":5404713,"html_url":"https://github.com/joestump/python-oauth2/pull/138","diff_url":"https://github.com/joestump/python-oauth2/pull/138.diff","patch_url":"https://github.com/joestump/python-oauth2/pull/138.patch","issue_url":"https://api.github.com/repos/joestump/python-oauth2/issues/138","number":138,"state":"closed","locked":false,"title":"Specification improvement and bug fix to sign_request","user":{"login":"rickhanlonii","id":2440089,"avatar_url":"https://avatars.githubusercontent.com/u/2440089?v=3","gravatar_id":"","url":"https://api.github.com/users/rickhanlonii","html_url":"https://github.com/rickhanlonii","followers_url":"https://api.github.com/users/rickhanlonii/followers","following_url":"https://api.github.com/users/rickhanlonii/following{/other_user}","gists_url":"https://api.github.com/users/rickhanlonii/gists{/gist_id}","starred_url":"https://api.github.com/users/rickhanlonii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickhanlonii/subscriptions","organizations_url":"https://api.github.com/users/rickhanlonii/orgs","repos_url":"https://api.github.com/users/rickhanlonii/repos","events_url":"https://api.github.com/users/rickhanlonii/events{/privacy}","received_events_url":"https://api.github.com/users/rickhanlonii/received_events","type":"User","site_admin":false},"body":"Per the [OAuth Body Hash specifications](http://oauth.googlecode.com/svn/spec/ext/body_hash/1.0/oauth-bodyhash.html) (3.2), if there is no body entity, then the hash should be done over the empty string.  \r\n  \r\nAlso, when `httplib2` handles a redirect, the follow is performed with `None` as the request body. This causes a TypeError to be thrown here when attempting to hash the body.  \r\n  \r\nThis commit prevents the TypeError, while improving the specification alignment. \r\n\"Win, win, win.\" -Michael Scott\r\n\r\n-----\r\nShould fix issue #112\r\nShould close pull #113  \r\n  \r\nMany thanks to @holm!","created_at":"2013-04-26T23:41:44Z","updated_at":"2016-02-11T10:49:23Z","closed_at":"2016-02-11T10:49:19Z","merged_at":null,"merge_commit_sha":"8fc0cb555d2c7cfbbb832b4773f73c9710626d2b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joestump/python-oauth2/pulls/138/commits","review_comments_url":"https://api.github.com/repos/joestump/python-oauth2/pulls/138/comments","review_comment_url":"https://api.github.com/repos/joestump/python-oauth2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joestump/python-oauth2/issues/138/comments","statuses_url":"https://api.github.com/repos/joestump/python-oauth2/statuses/b5d35d58c0a0fe9eb9f3e0e8af63a72dcf0a2393","head":{"label":"rickhanlonii:improve_sign_reques","ref":"improve_sign_reques","sha":"b5d35d58c0a0fe9eb9f3e0e8af63a72dcf0a2393","user":{"login":"rickhanlonii","id":2440089,"avatar_url":"https://avatars.githubusercontent.com/u/2440089?v=3","gravatar_id":"","url":"https://api.github.com/users/rickhanlonii","html_url":"https://github.com/rickhanlonii","followers_url":"https://api.github.com/users/rickhanlonii/followers","following_url":"https://api.github.com/users/rickhanlonii/following{/other_user}","gists_url":"https://api.github.com/users/rickhanlonii/gists{/gist_id}","starred_url":"https://api.github.com/users/rickhanlonii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickhanlonii/subscriptions","organizations_url":"https://api.github.com/users/rickhanlonii/orgs","repos_url":"https://api.github.com/users/rickhanlonii/repos","events_url":"https://api.github.com/users/rickhanlonii/events{/privacy}","received_events_url":"https://api.github.com/users/rickhanlonii/received_events","type":"User","site_admin":false},"repo":{"id":9705826,"name":"python-oauth2","full_name":"rickhanlonii/python-oauth2","owner":{"login":"rickhanlonii","id":2440089,"avatar_url":"https://avatars.githubusercontent.com/u/2440089?v=3","gravatar_id":"","url":"https://api.github.com/users/rickhanlonii","html_url":"https://github.com/rickhanlonii","followers_url":"https://api.github.com/users/rickhanlonii/followers","following_url":"https://api.github.com/users/rickhanlonii/following{/other_user}","gists_url":"https://api.github.com/users/rickhanlonii/gists{/gist_id}","starred_url":"https://api.github.com/users/rickhanlonii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickhanlonii/subscriptions","organizations_url":"https://api.github.com/users/rickhanlonii/orgs","repos_url":"https://api.github.com/users/rickhanlonii/repos","events_url":"https://api.github.com/users/rickhanlonii/events{/privacy}","received_events_url":"https://api.github.com/users/rickhanlonii/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rickhanlonii/python-oauth2","description":"A fully tested, abstract interface to creating OAuth clients and servers.","fork":true,"url":"https://api.github.com/repos/rickhanlonii/python-oauth2","forks_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/forks","keys_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/teams","hooks_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/hooks","issue_events_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/issues/events{/number}","events_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/events","assignees_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/assignees{/user}","branches_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/branches{/branch}","tags_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/tags","blobs_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/git/refs{/sha}","trees_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/statuses/{sha}","languages_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/languages","stargazers_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/stargazers","contributors_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/contributors","subscribers_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/subscribers","subscription_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/subscription","commits_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/commits{/sha}","git_commits_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/git/commits{/sha}","comments_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/comments{/number}","issue_comment_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/issues/comments{/number}","contents_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/contents/{+path}","compare_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/merges","archive_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/downloads","issues_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/issues{/number}","pulls_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/pulls{/number}","milestones_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/milestones{/number}","notifications_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/labels{/name}","releases_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/releases{/id}","deployments_url":"https://api.github.com/repos/rickhanlonii/python-oauth2/deployments","created_at":"2013-04-26T22:57:24Z","updated_at":"2015-07-29T02:07:41Z","pushed_at":"2015-09-08T17:37:43Z","git_url":"git://github.com/rickhanlonii/python-oauth2.git","ssh_url":"git@github.com:rickhanlonii/python-oauth2.git","clone_url":"https://github.com/rickhanlonii/python-oauth2.git","svn_url":"https://github.com/rickhanlonii/python-oauth2","homepage":"","size":564,"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":"joestump:master","ref":"master","sha":"a83f4a297336b631e75cba102910c19231518159","user":{"login":"joestump","id":37667,"avatar_url":"https://avatars.githubusercontent.com/u/37667?v=3","gravatar_id":"","url":"https://api.github.com/users/joestump","html_url":"https://github.com/joestump","followers_url":"https://api.github.com/users/joestump/followers","following_url":"https://api.github.com/users/joestump/following{/other_user}","gists_url":"https://api.github.com/users/joestump/gists{/gist_id}","starred_url":"https://api.github.com/users/joestump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joestump/subscriptions","organizations_url":"https://api.github.com/users/joestump/orgs","repos_url":"https://api.github.com/users/joestump/repos","events_url":"https://api.github.com/users/joestump/events{/privacy}","received_events_url":"https://api.github.com/users/joestump/received_events","type":"User","site_admin":false},"repo":{"id":345048,"name":"python-oauth2","full_name":"joestump/python-oauth2","owner":{"login":"joestump","id":37667,"avatar_url":"https://avatars.githubusercontent.com/u/37667?v=3","gravatar_id":"","url":"https://api.github.com/users/joestump","html_url":"https://github.com/joestump","followers_url":"https://api.github.com/users/joestump/followers","following_url":"https://api.github.com/users/joestump/following{/other_user}","gists_url":"https://api.github.com/users/joestump/gists{/gist_id}","starred_url":"https://api.github.com/users/joestump/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joestump/subscriptions","organizations_url":"https://api.github.com/users/joestump/orgs","repos_url":"https://api.github.com/users/joestump/repos","events_url":"https://api.github.com/users/joestump/events{/privacy}","received_events_url":"https://api.github.com/users/joestump/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joestump/python-oauth2","description":"A fully tested, abstract interface to creating OAuth clients and servers.","fork":false,"url":"https://api.github.com/repos/joestump/python-oauth2","forks_url":"https://api.github.com/repos/joestump/python-oauth2/forks","keys_url":"https://api.github.com/repos/joestump/python-oauth2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joestump/python-oauth2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joestump/python-oauth2/teams","hooks_url":"https://api.github.com/repos/joestump/python-oauth2/hooks","issue_events_url":"https://api.github.com/repos/joestump/python-oauth2/issues/events{/number}","events_url":"https://api.github.com/repos/joestump/python-oauth2/events","assignees_url":"https://api.github.com/repos/joestump/python-oauth2/assignees{/user}","branches_url":"https://api.github.com/repos/joestump/python-oauth2/branches{/branch}","tags_url":"https://api.github.com/repos/joestump/python-oauth2/tags","blobs_url":"https://api.github.com/repos/joestump/python-oauth2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joestump/python-oauth2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joestump/python-oauth2/git/refs{/sha}","trees_url":"https://api.github.com/repos/joestump/python-oauth2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joestump/python-oauth2/statuses/{sha}","languages_url":"https://api.github.com/repos/joestump/python-oauth2/languages","stargazers_url":"https://api.github.com/repos/joestump/python-oauth2/stargazers","contributors_url":"https://api.github.com/repos/joestump/python-oauth2/contributors","subscribers_url":"https://api.github.com/repos/joestump/python-oauth2/subscribers","subscription_url":"https://api.github.com/repos/joestump/python-oauth2/subscription","commits_url":"https://api.github.com/repos/joestump/python-oauth2/commits{/sha}","git_commits_url":"https://api.github.com/repos/joestump/python-oauth2/git/commits{/sha}","comments_url":"https://api.github.com/repos/joestump/python-oauth2/comments{/number}","issue_comment_url":"https://api.github.com/repos/joestump/python-oauth2/issues/comments{/number}","contents_url":"https://api.github.com/repos/joestump/python-oauth2/contents/{+path}","compare_url":"https://api.github.com/repos/joestump/python-oauth2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joestump/python-oauth2/merges","archive_url":"https://api.github.com/repos/joestump/python-oauth2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joestump/python-oauth2/downloads","issues_url":"https://api.github.com/repos/joestump/python-oauth2/issues{/number}","pulls_url":"https://api.github.com/repos/joestump/python-oauth2/pulls{/number}","milestones_url":"https://api.github.com/repos/joestump/python-oauth2/milestones{/number}","notifications_url":"https://api.github.com/repos/joestump/python-oauth2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joestump/python-oauth2/labels{/name}","releases_url":"https://api.github.com/repos/joestump/python-oauth2/releases{/id}","deployments_url":"https://api.github.com/repos/joestump/python-oauth2/deployments","created_at":"2009-10-21T17:21:07Z","updated_at":"2016-02-09T18:09:28Z","pushed_at":"2015-11-18T16:07:32Z","git_url":"git://github.com/joestump/python-oauth2.git","ssh_url":"git@github.com:joestump/python-oauth2.git","clone_url":"https://github.com/joestump/python-oauth2.git","svn_url":"https://github.com/joestump/python-oauth2","homepage":"","size":1973,"stargazers_count":2325,"watchers_count":2325,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":925,"mirror_url":null,"open_issues_count":62,"forks":925,"open_issues":62,"watchers":2325,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joestump/python-oauth2/pulls/138"},"html":{"href":"https://github.com/joestump/python-oauth2/pull/138"},"issue":{"href":"https://api.github.com/repos/joestump/python-oauth2/issues/138"},"comments":{"href":"https://api.github.com/repos/joestump/python-oauth2/issues/138/comments"},"review_comments":{"href":"https://api.github.com/repos/joestump/python-oauth2/pulls/138/comments"},"review_comment":{"href":"https://api.github.com/repos/joestump/python-oauth2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joestump/python-oauth2/pulls/138/commits"},"statuses":{"href":"https://api.github.com/repos/joestump/python-oauth2/statuses/b5d35d58c0a0fe9eb9f3e0e8af63a72dcf0a2393"}}}}