{"action":"closed","number":83,"pull_request":{"url":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/83","id":40568002,"html_url":"https://github.com/4teamwork/ftw.upgrade/pull/83","diff_url":"https://github.com/4teamwork/ftw.upgrade/pull/83.diff","patch_url":"https://github.com/4teamwork/ftw.upgrade/pull/83.patch","issue_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/83","number":83,"state":"closed","locked":false,"title":"Fix authentication problem with bin/upgrade command.","user":{"login":"jone","id":7469,"avatar_url":"https://avatars.githubusercontent.com/u/7469?v=3","gravatar_id":"","url":"https://api.github.com/users/jone","html_url":"https://github.com/jone","followers_url":"https://api.github.com/users/jone/followers","following_url":"https://api.github.com/users/jone/following{/other_user}","gists_url":"https://api.github.com/users/jone/gists{/gist_id}","starred_url":"https://api.github.com/users/jone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jone/subscriptions","organizations_url":"https://api.github.com/users/jone/orgs","repos_url":"https://api.github.com/users/jone/repos","events_url":"https://api.github.com/users/jone/events{/privacy}","received_events_url":"https://api.github.com/users/jone/received_events","type":"User","site_admin":false},"body":"In certain situations depending on Python version and current\r\nauthentication hash the base64 of the authentication header may contain\r\nnewlines, which is not valid in HTTP request headers.\r\nSince we do not have special characters in the header value we do not\r\nneed to encode it with base64.\r\n\r\nExample failure:\r\n```python\r\nError in test test_tempfile_authentication (ftw.upgrade.tests.test_command_jsonapi.TestAPIRequestor)\r\nTraceback (most recent call last):\r\n  File \"/Users/jone/projects/python/cache/eggs/unittest2-0.5.1-py2.7.egg/unittest2/case.py\", line 340, in run\r\n    testMethod()\r\n  File \"/Users/jone/projects/packages/ftw.upgrade/ftw/upgrade/tests/test_command_jsonapi.py\", line 58, in test_tempfile_authentication\r\n    jsondata = requestor.GET('current_user').json()\r\n  File \"/Users/jone/projects/packages/ftw.upgrade/ftw/upgrade/command/jsonapi.py\", line 30, in GET\r\n    return self._make_request('GET', action, site=site, **kwargs)\r\n  File \"/Users/jone/projects/packages/ftw.upgrade/ftw/upgrade/command/jsonapi.py\", line 37, in _make_request\r\n    response = self.session.request(method.upper(), url, **kwargs)\r\n  File \"/Users/jone/projects/python/cache/eggs/requests-2.7.0-py2.7.egg/requests/sessions.py\", line 465, in request\r\n    resp = self.send(prep, **send_kwargs)\r\n  File \"/Users/jone/projects/python/cache/eggs/requests-2.7.0-py2.7.egg/requests/sessions.py\", line 573, in send\r\n    r = adapter.send(request, **kwargs)\r\n  File \"/Users/jone/projects/python/cache/eggs/requests-2.7.0-py2.7.egg/requests/adapters.py\", line 370, in send\r\n    timeout=timeout\r\n  File \"/Users/jone/projects/python/cache/eggs/requests-2.7.0-py2.7.egg/requests/packages/urllib3/connectionpool.py\", line 544, in urlopen\r\n    body=body, headers=headers)\r\n  File \"/Users/jone/projects/python/cache/eggs/requests-2.7.0-py2.7.egg/requests/packages/urllib3/connectionpool.py\", line 349, in _make_request\r\n    conn.request(method, url, **httplib_request_kw)\r\n  File \"/Users/jone/projects/python/buildout.python/parts/opt/lib/python2.7/httplib.py\", line 1053, in request\r\n    self._send_request(method, url, body, headers)\r\n  File \"/Users/jone/projects/python/buildout.python/parts/opt/lib/python2.7/httplib.py\", line 1092, in _send_request\r\n    self.putheader(hdr, value)\r\n  File \"/Users/jone/projects/python/buildout.python/parts/opt/lib/python2.7/httplib.py\", line 1031, in putheader\r\n    raise ValueError('Invalid header value %r' % (one_value,))\r\nValueError: Invalid header value 'dG1wOUlIS2thOjkwMDE5NDAxMzYwNTkyN2Y3ZTI3YjkwOGIxNzZkN2JiYWQ0ZjdjOTVkY2Q0Y2Q5\\nMzk4NWQ1NzE5YmY1Y2RhYWM=\\n'\r\n```","created_at":"2015-07-22T14:02:47Z","updated_at":"2015-07-23T12:09:44Z","closed_at":"2015-07-23T12:09:44Z","merged_at":"2015-07-23T12:09:44Z","merge_commit_sha":"ae1bda9c1f22144283febccc6c82b57d762d9f00","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/83/commits","review_comments_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/83/comments","review_comment_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/83/comments","statuses_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/statuses/aa733c7fca0251f9c336ac3747d5ff41a5254077","head":{"label":"4teamwork:jone-command-auth-bug","ref":"jone-command-auth-bug","sha":"aa733c7fca0251f9c336ac3747d5ff41a5254077","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":2843531,"name":"ftw.upgrade","full_name":"4teamwork/ftw.upgrade","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/ftw.upgrade","description":"An upgrade control panel and upgrade helpers for plone upgrades.","fork":false,"url":"https://api.github.com/repos/4teamwork/ftw.upgrade","forks_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/forks","keys_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/teams","hooks_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/events","assignees_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/tags","blobs_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/languages","stargazers_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/subscription","commits_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/merges","archive_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/downloads","issues_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/releases{/id}","created_at":"2011-11-24T13:31:43Z","updated_at":"2015-06-05T11:19:22Z","pushed_at":"2015-07-23T12:09:44Z","git_url":"git://github.com/4teamwork/ftw.upgrade.git","ssh_url":"git@github.com:4teamwork/ftw.upgrade.git","clone_url":"https://github.com/4teamwork/ftw.upgrade.git","svn_url":"https://github.com/4teamwork/ftw.upgrade","homepage":"","size":1597,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":3,"default_branch":"master"}},"base":{"label":"4teamwork:master","ref":"master","sha":"8c15a78400e845fc596b713f7b404433c5b5174c","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":2843531,"name":"ftw.upgrade","full_name":"4teamwork/ftw.upgrade","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/ftw.upgrade","description":"An upgrade control panel and upgrade helpers for plone upgrades.","fork":false,"url":"https://api.github.com/repos/4teamwork/ftw.upgrade","forks_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/forks","keys_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/teams","hooks_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/events","assignees_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/tags","blobs_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/languages","stargazers_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/subscription","commits_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/merges","archive_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/downloads","issues_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/ftw.upgrade/releases{/id}","created_at":"2011-11-24T13:31:43Z","updated_at":"2015-06-05T11:19:22Z","pushed_at":"2015-07-23T12:09:44Z","git_url":"git://github.com/4teamwork/ftw.upgrade.git","ssh_url":"git@github.com:4teamwork/ftw.upgrade.git","clone_url":"https://github.com/4teamwork/ftw.upgrade.git","svn_url":"https://github.com/4teamwork/ftw.upgrade","homepage":"","size":1597,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":3,"forks":2,"open_issues":3,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/83"},"html":{"href":"https://github.com/4teamwork/ftw.upgrade/pull/83"},"issue":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/83"},"comments":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/issues/83/comments"},"review_comments":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/83/comments"},"review_comment":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/pulls/83/commits"},"statuses":{"href":"https://api.github.com/repos/4teamwork/ftw.upgrade/statuses/aa733c7fca0251f9c336ac3747d5ff41a5254077"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"jone","id":7469,"avatar_url":"https://avatars.githubusercontent.com/u/7469?v=3","gravatar_id":"","url":"https://api.github.com/users/jone","html_url":"https://github.com/jone","followers_url":"https://api.github.com/users/jone/followers","following_url":"https://api.github.com/users/jone/following{/other_user}","gists_url":"https://api.github.com/users/jone/gists{/gist_id}","starred_url":"https://api.github.com/users/jone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jone/subscriptions","organizations_url":"https://api.github.com/users/jone/orgs","repos_url":"https://api.github.com/users/jone/repos","events_url":"https://api.github.com/users/jone/events{/privacy}","received_events_url":"https://api.github.com/users/jone/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":3,"deletions":4,"changed_files":3}}