{"action":"created","issue":{"url":"https://api.github.com/repos/jmapio/jmap-perl/issues/21","repository_url":"https://api.github.com/repos/jmapio/jmap-perl","labels_url":"https://api.github.com/repos/jmapio/jmap-perl/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/jmapio/jmap-perl/issues/21/comments","events_url":"https://api.github.com/repos/jmapio/jmap-perl/issues/21/events","html_url":"https://github.com/jmapio/jmap-perl/issues/21","id":154913317,"number":21,"title":"Header decoding charset problem","user":{"login":"thomascube","id":1577511,"avatar_url":"https://avatars.githubusercontent.com/u/1577511?v=3","gravatar_id":"","url":"https://api.github.com/users/thomascube","html_url":"https://github.com/thomascube","followers_url":"https://api.github.com/users/thomascube/followers","following_url":"https://api.github.com/users/thomascube/following{/other_user}","gists_url":"https://api.github.com/users/thomascube/gists{/gist_id}","starred_url":"https://api.github.com/users/thomascube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomascube/subscriptions","organizations_url":"https://api.github.com/users/thomascube/orgs","repos_url":"https://api.github.com/users/thomascube/repos","events_url":"https://api.github.com/users/thomascube/events{/privacy}","received_events_url":"https://api.github.com/users/thomascube/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-15T15:10:42Z","updated_at":"2016-05-27T05:19:25Z","closed_at":"2016-05-27T05:19:25Z","body":"When accessing messages with UTF-8 quoted-printable encoded headers, the values exposed in the JSON response by the JMAP proxy contain wrongly encoded unicode characters.\r\n\r\nThe following subject header in the original IMAP message\r\n```\r\nSubject: =?UTF-8?Q?Bern:=20Vari=C3=A9t=C3=A9,=20Juliette=20&=20Meeressause?=\r\n```\r\nresults in a response\r\n```\r\n[\r\n    \"messages\",\r\n    {\r\n        \"accountId\": \"xxxxx\",\r\n        \"list\": [\r\n            {\r\n                \"headers\": {\r\n                    \"Subject\": \"Bern: VariÃ©tÃ©, Juliette & Meeressause\",\r\n                    ...\r\n                },\r\n                ...\r\n                \"subject\": \"Bern: VariÃ©tÃ©, Juliette & Meeressause\",\r\n                ...\r\n            }\r\n        ]\r\n    },\r\n    \"#1\"\r\n]\r\n```\r\n\r\nIt appears that the decoded header value is treated as iso-8859-1 encoded and is then converted to utf-8 resulting in a double encoding."},"comment":{"url":"https://api.github.com/repos/jmapio/jmap-perl/issues/comments/222062419","html_url":"https://github.com/jmapio/jmap-perl/issues/21#issuecomment-222062419","issue_url":"https://api.github.com/repos/jmapio/jmap-perl/issues/21","id":222062419,"user":{"login":"brong","id":17645,"avatar_url":"https://avatars.githubusercontent.com/u/17645?v=3","gravatar_id":"","url":"https://api.github.com/users/brong","html_url":"https://github.com/brong","followers_url":"https://api.github.com/users/brong/followers","following_url":"https://api.github.com/users/brong/following{/other_user}","gists_url":"https://api.github.com/users/brong/gists{/gist_id}","starred_url":"https://api.github.com/users/brong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brong/subscriptions","organizations_url":"https://api.github.com/users/brong/orgs","repos_url":"https://api.github.com/users/brong/repos","events_url":"https://api.github.com/users/brong/events{/privacy}","received_events_url":"https://api.github.com/users/brong/received_events","type":"User","site_admin":false},"created_at":"2016-05-27T05:19:25Z","updated_at":"2016-05-27T05:19:25Z","body":"This is fixed by\r\n\r\ncommit 9c83cee88a9dc038f6b8b15e7421b0f1d57bb667\r\nAuthor: Bron Gondwana <brong@fastmail.fm>\r\nDate:   Fri May 27 00:19:55 2016 -0400\r\n\r\n    don't double-encode utf8\r\n\r\n...\r\n\r\nThe bug was in the server.pl."}}
{"actor":{"display_login":"brong"}}