{"action":"opened","number":40,"pull_request":{"url":"https://api.github.com/repos/mozilla-services/mozservices/pulls/40","id":121175851,"html_url":"https://github.com/mozilla-services/mozservices/pull/40","diff_url":"https://github.com/mozilla-services/mozservices/pull/40.diff","patch_url":"https://github.com/mozilla-services/mozservices/pull/40.patch","issue_url":"https://api.github.com/repos/mozilla-services/mozservices/issues/40","number":40,"state":"open","locked":false,"title":"Bug 1365328 - Gracefully handle non-utf8 URL paths","user":{"login":"rfk","id":34695,"avatar_url":"https://avatars0.githubusercontent.com/u/34695?v=3","gravatar_id":"","url":"https://api.github.com/users/rfk","html_url":"https://github.com/rfk","followers_url":"https://api.github.com/users/rfk/followers","following_url":"https://api.github.com/users/rfk/following{/other_user}","gists_url":"https://api.github.com/users/rfk/gists{/gist_id}","starred_url":"https://api.github.com/users/rfk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rfk/subscriptions","organizations_url":"https://api.github.com/users/rfk/orgs","repos_url":"https://api.github.com/users/rfk/repos","events_url":"https://api.github.com/users/rfk/events{/privacy}","received_events_url":"https://api.github.com/users/rfk/received_events","type":"User","site_admin":false},"body":"In https://bugzilla.mozilla.org/show_bug.cgi?id=1365328 we discovered that the tokenserver returns a \"500 server error\" when requesting a URL with invalid utf8 in the path component, such as \"/%FF\".  There's no harm in erroring out, but let's do it cleanly so that the server logs aren't filled with spurious 500 errors.\r\n\r\nThis adds an exception view to convert the exception into a 404, which appears to be the recommended approach for pyramid.  It also slightly adjusts the metrics-gathering code, which assumes that the path can be converted to a string, and which was previously running before pyramid got a chance to route-match the path and detect it as invalid.\r\n\r\n@Natim r?","created_at":"2017-05-17T23:54:11Z","updated_at":"2017-05-17T23:54:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-services/mozservices/pulls/40/commits","review_comments_url":"https://api.github.com/repos/mozilla-services/mozservices/pulls/40/comments","review_comment_url":"https://api.github.com/repos/mozilla-services/mozservices/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-services/mozservices/issues/40/comments","statuses_url":"https://api.github.com/repos/mozilla-services/mozservices/statuses/ca7f84211d1fa1e7d5e503b9cb23fadc34d6bc4a","head":{"label":"mozilla-services:handle-non-utf8-paths","ref":"handle-non-utf8-paths","sha":"ca7f84211d1fa1e7d5e503b9cb23fadc34d6bc4a","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars2.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":2605002,"name":"mozservices","full_name":"mozilla-services/mozservices","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars2.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/mozservices","description":"Various utilities for Pyramid-based Mozilla applications","fork":false,"url":"https://api.github.com/repos/mozilla-services/mozservices","forks_url":"https://api.github.com/repos/mozilla-services/mozservices/forks","keys_url":"https://api.github.com/repos/mozilla-services/mozservices/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/mozservices/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/mozservices/teams","hooks_url":"https://api.github.com/repos/mozilla-services/mozservices/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/mozservices/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/mozservices/events","assignees_url":"https://api.github.com/repos/mozilla-services/mozservices/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/mozservices/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/mozservices/tags","blobs_url":"https://api.github.com/repos/mozilla-services/mozservices/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/mozservices/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/mozservices/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/mozservices/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/mozservices/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/mozservices/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/mozservices/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/mozservices/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/mozservices/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/mozservices/subscription","commits_url":"https://api.github.com/repos/mozilla-services/mozservices/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/mozservices/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/mozservices/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/mozservices/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/mozservices/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/mozservices/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/mozservices/merges","archive_url":"https://api.github.com/repos/mozilla-services/mozservices/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/mozservices/downloads","issues_url":"https://api.github.com/repos/mozilla-services/mozservices/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/mozservices/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/mozservices/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/mozservices/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/mozservices/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/mozservices/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-services/mozservices/deployments","created_at":"2011-10-19T09:12:33Z","updated_at":"2017-05-13T19:57:33Z","pushed_at":"2017-05-17T23:50:48Z","git_url":"git://github.com/mozilla-services/mozservices.git","ssh_url":"git@github.com:mozilla-services/mozservices.git","clone_url":"https://github.com/mozilla-services/mozservices.git","svn_url":"https://github.com/mozilla-services/mozservices","homepage":"","size":295,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":30,"default_branch":"master"}},"base":{"label":"mozilla-services:master","ref":"master","sha":"b9f46f2fc5827c554e94c11b0c222bfe86495ee3","user":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars2.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"repo":{"id":2605002,"name":"mozservices","full_name":"mozilla-services/mozservices","owner":{"login":"mozilla-services","id":1066228,"avatar_url":"https://avatars2.githubusercontent.com/u/1066228?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-services","html_url":"https://github.com/mozilla-services","followers_url":"https://api.github.com/users/mozilla-services/followers","following_url":"https://api.github.com/users/mozilla-services/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-services/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-services/subscriptions","organizations_url":"https://api.github.com/users/mozilla-services/orgs","repos_url":"https://api.github.com/users/mozilla-services/repos","events_url":"https://api.github.com/users/mozilla-services/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-services/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-services/mozservices","description":"Various utilities for Pyramid-based Mozilla applications","fork":false,"url":"https://api.github.com/repos/mozilla-services/mozservices","forks_url":"https://api.github.com/repos/mozilla-services/mozservices/forks","keys_url":"https://api.github.com/repos/mozilla-services/mozservices/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-services/mozservices/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-services/mozservices/teams","hooks_url":"https://api.github.com/repos/mozilla-services/mozservices/hooks","issue_events_url":"https://api.github.com/repos/mozilla-services/mozservices/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-services/mozservices/events","assignees_url":"https://api.github.com/repos/mozilla-services/mozservices/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-services/mozservices/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-services/mozservices/tags","blobs_url":"https://api.github.com/repos/mozilla-services/mozservices/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-services/mozservices/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-services/mozservices/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-services/mozservices/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-services/mozservices/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-services/mozservices/languages","stargazers_url":"https://api.github.com/repos/mozilla-services/mozservices/stargazers","contributors_url":"https://api.github.com/repos/mozilla-services/mozservices/contributors","subscribers_url":"https://api.github.com/repos/mozilla-services/mozservices/subscribers","subscription_url":"https://api.github.com/repos/mozilla-services/mozservices/subscription","commits_url":"https://api.github.com/repos/mozilla-services/mozservices/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-services/mozservices/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-services/mozservices/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-services/mozservices/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-services/mozservices/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-services/mozservices/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-services/mozservices/merges","archive_url":"https://api.github.com/repos/mozilla-services/mozservices/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-services/mozservices/downloads","issues_url":"https://api.github.com/repos/mozilla-services/mozservices/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-services/mozservices/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-services/mozservices/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-services/mozservices/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-services/mozservices/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-services/mozservices/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla-services/mozservices/deployments","created_at":"2011-10-19T09:12:33Z","updated_at":"2017-05-13T19:57:33Z","pushed_at":"2017-05-17T23:50:48Z","git_url":"git://github.com/mozilla-services/mozservices.git","ssh_url":"git@github.com:mozilla-services/mozservices.git","clone_url":"https://github.com/mozilla-services/mozservices.git","svn_url":"https://github.com/mozilla-services/mozservices","homepage":"","size":295,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-services/mozservices/pulls/40"},"html":{"href":"https://github.com/mozilla-services/mozservices/pull/40"},"issue":{"href":"https://api.github.com/repos/mozilla-services/mozservices/issues/40"},"comments":{"href":"https://api.github.com/repos/mozilla-services/mozservices/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-services/mozservices/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-services/mozservices/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-services/mozservices/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-services/mozservices/statuses/ca7f84211d1fa1e7d5e503b9cb23fadc34d6bc4a"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":57,"deletions":4,"changed_files":3}}
{"actor":{"display_login":"rfk"}}