{"action":"created","issue":{"url":"https://api.github.com/repos/odoo/odoo/issues/16960","repository_url":"https://api.github.com/repos/odoo/odoo","labels_url":"https://api.github.com/repos/odoo/odoo/issues/16960/labels{/name}","comments_url":"https://api.github.com/repos/odoo/odoo/issues/16960/comments","events_url":"https://api.github.com/repos/odoo/odoo/issues/16960/events","html_url":"https://github.com/odoo/odoo/pull/16960","id":228350420,"node_id":"MDExOlB1bGxSZXF1ZXN0MTIwMzY0NzAy","number":16960,"title":"[FIX] http: Bypass SharedDataMiddleware if it's going to fail.","user":{"login":"mvaled","id":270825,"node_id":"MDQ6VXNlcjI3MDgyNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/270825?v=4","gravatar_id":"","url":"https://api.github.com/users/mvaled","html_url":"https://github.com/mvaled","followers_url":"https://api.github.com/users/mvaled/followers","following_url":"https://api.github.com/users/mvaled/following{/other_user}","gists_url":"https://api.github.com/users/mvaled/gists{/gist_id}","starred_url":"https://api.github.com/users/mvaled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvaled/subscriptions","organizations_url":"https://api.github.com/users/mvaled/orgs","repos_url":"https://api.github.com/users/mvaled/repos","events_url":"https://api.github.com/users/mvaled/events{/privacy}","received_events_url":"https://api.github.com/users/mvaled/received_events","type":"User","site_admin":false},"labels":[{"id":616698546,"node_id":"MDU6TGFiZWw2MTY2OTg1NDY=","url":"https://api.github.com/repos/odoo/odoo/labels/Framework","name":"Framework","color":"E5E970","default":false}],"state":"open","locked":false,"assignee":{"login":"KangOl","id":38731,"node_id":"MDQ6VXNlcjM4NzMx","avatar_url":"https://avatars2.githubusercontent.com/u/38731?v=4","gravatar_id":"","url":"https://api.github.com/users/KangOl","html_url":"https://github.com/KangOl","followers_url":"https://api.github.com/users/KangOl/followers","following_url":"https://api.github.com/users/KangOl/following{/other_user}","gists_url":"https://api.github.com/users/KangOl/gists{/gist_id}","starred_url":"https://api.github.com/users/KangOl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KangOl/subscriptions","organizations_url":"https://api.github.com/users/KangOl/orgs","repos_url":"https://api.github.com/users/KangOl/repos","events_url":"https://api.github.com/users/KangOl/events{/privacy}","received_events_url":"https://api.github.com/users/KangOl/received_events","type":"User","site_admin":false},"assignees":[{"login":"KangOl","id":38731,"node_id":"MDQ6VXNlcjM4NzMx","avatar_url":"https://avatars2.githubusercontent.com/u/38731?v=4","gravatar_id":"","url":"https://api.github.com/users/KangOl","html_url":"https://github.com/KangOl","followers_url":"https://api.github.com/users/KangOl/followers","following_url":"https://api.github.com/users/KangOl/following{/other_user}","gists_url":"https://api.github.com/users/KangOl/gists{/gist_id}","starred_url":"https://api.github.com/users/KangOl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KangOl/subscriptions","organizations_url":"https://api.github.com/users/KangOl/orgs","repos_url":"https://api.github.com/users/KangOl/repos","events_url":"https://api.github.com/users/KangOl/events{/privacy}","received_events_url":"https://api.github.com/users/KangOl/received_events","type":"User","site_admin":false},{"login":"antonylesuisse","id":641600,"node_id":"MDQ6VXNlcjY0MTYwMA==","avatar_url":"https://avatars0.githubusercontent.com/u/641600?v=4","gravatar_id":"","url":"https://api.github.com/users/antonylesuisse","html_url":"https://github.com/antonylesuisse","followers_url":"https://api.github.com/users/antonylesuisse/followers","following_url":"https://api.github.com/users/antonylesuisse/following{/other_user}","gists_url":"https://api.github.com/users/antonylesuisse/gists{/gist_id}","starred_url":"https://api.github.com/users/antonylesuisse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antonylesuisse/subscriptions","organizations_url":"https://api.github.com/users/antonylesuisse/orgs","repos_url":"https://api.github.com/users/antonylesuisse/repos","events_url":"https://api.github.com/users/antonylesuisse/events{/privacy}","received_events_url":"https://api.github.com/users/antonylesuisse/received_events","type":"User","site_admin":false},{"login":"rco-odoo","id":7578141,"node_id":"MDQ6VXNlcjc1NzgxNDE=","avatar_url":"https://avatars2.githubusercontent.com/u/7578141?v=4","gravatar_id":"","url":"https://api.github.com/users/rco-odoo","html_url":"https://github.com/rco-odoo","followers_url":"https://api.github.com/users/rco-odoo/followers","following_url":"https://api.github.com/users/rco-odoo/following{/other_user}","gists_url":"https://api.github.com/users/rco-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/rco-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rco-odoo/subscriptions","organizations_url":"https://api.github.com/users/rco-odoo/orgs","repos_url":"https://api.github.com/users/rco-odoo/repos","events_url":"https://api.github.com/users/rco-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/rco-odoo/received_events","type":"User","site_admin":false}],"milestone":null,"comments":7,"created_at":"2017-05-12T16:57:22Z","updated_at":"2018-10-08T13:48:21Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/odoo/odoo/pulls/16960","html_url":"https://github.com/odoo/odoo/pull/16960","diff_url":"https://github.com/odoo/odoo/pull/16960.diff","patch_url":"https://github.com/odoo/odoo/pull/16960.patch"},"body":"SharedDataMiddleware expects the encoding in the URL be the same on the file system.  See the issue mitsuhiko/werkzeug#379\r\n\r\nFor custom controllers where portions of the URL may contain components otherwise encoded this assumption won't hold. Furthermore custom controllers won't even get the change to try themselves up to the task ;)  We'll see the following error:\r\n\r\n```\r\nUnicodeEncodeError: 'ascii' codec can't encode character u'\\xe9' in position 38: ordinal not in range(128)\r\n  File \"openerp/service/wsgi_server.py\", line 203, in application_unproxied\r\nresult = handler(environ, start_response)\r\n  File \"openerp/http.py\", line 1292, in __call__\r\nreturn self.dispatch(environ, start_response)\r\n  File \"openerp/http.py\", line 1266, in __call__\r\nreturn self.app(environ, start_wrapped)\r\n  File \"werkzeug/wsgi.py\", line 570, in __call__\r\ncleaned_path = cleaned_path.encode(sys.getfilesystemencoding())\r\n```\r\n\r\nThis patch avoids the problem at the cost of a little overhead. Probably what should be done is to check the controllers routes for a match before wrapping the WSGI with SharedDataMiddleware.\r\n\r\nRelated: #7862"},"comment":{"url":"https://api.github.com/repos/odoo/odoo/issues/comments/427840279","html_url":"https://github.com/odoo/odoo/pull/16960#issuecomment-427840279","issue_url":"https://api.github.com/repos/odoo/odoo/issues/16960","id":427840279,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNzg0MDI3OQ==","user":{"login":"xmo-odoo","id":7571158,"node_id":"MDQ6VXNlcjc1NzExNTg=","avatar_url":"https://avatars1.githubusercontent.com/u/7571158?v=4","gravatar_id":"","url":"https://api.github.com/users/xmo-odoo","html_url":"https://github.com/xmo-odoo","followers_url":"https://api.github.com/users/xmo-odoo/followers","following_url":"https://api.github.com/users/xmo-odoo/following{/other_user}","gists_url":"https://api.github.com/users/xmo-odoo/gists{/gist_id}","starred_url":"https://api.github.com/users/xmo-odoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xmo-odoo/subscriptions","organizations_url":"https://api.github.com/users/xmo-odoo/orgs","repos_url":"https://api.github.com/users/xmo-odoo/repos","events_url":"https://api.github.com/users/xmo-odoo/events{/privacy}","received_events_url":"https://api.github.com/users/xmo-odoo/received_events","type":"User","site_admin":false},"created_at":"2018-10-08T13:48:21Z","updated_at":"2018-10-08T13:48:21Z","author_association":"COLLABORATOR","body":"@mvaled Python 2 has been dropped from 12.0/master."}}
{"actor":{"display_login":"xmo-odoo"}}