{"action":"created","issue":{"url":"https://api.github.com/repos/mvantellingen/python-zeep/issues/836","repository_url":"https://api.github.com/repos/mvantellingen/python-zeep","labels_url":"https://api.github.com/repos/mvantellingen/python-zeep/issues/836/labels{/name}","comments_url":"https://api.github.com/repos/mvantellingen/python-zeep/issues/836/comments","events_url":"https://api.github.com/repos/mvantellingen/python-zeep/issues/836/events","html_url":"https://github.com/mvantellingen/python-zeep/pull/836","id":366083815,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5ODQ4NDE2","number":836,"title":"Fix Transport.post log message response content decoding","user":{"login":"lamenezes","id":3208493,"node_id":"MDQ6VXNlcjMyMDg0OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/3208493?v=4","gravatar_id":"","url":"https://api.github.com/users/lamenezes","html_url":"https://github.com/lamenezes","followers_url":"https://api.github.com/users/lamenezes/followers","following_url":"https://api.github.com/users/lamenezes/following{/other_user}","gists_url":"https://api.github.com/users/lamenezes/gists{/gist_id}","starred_url":"https://api.github.com/users/lamenezes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamenezes/subscriptions","organizations_url":"https://api.github.com/users/lamenezes/orgs","repos_url":"https://api.github.com/users/lamenezes/repos","events_url":"https://api.github.com/users/lamenezes/events{/privacy}","received_events_url":"https://api.github.com/users/lamenezes/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-02T21:17:41Z","updated_at":"2018-11-18T09:16:21Z","closed_at":"2018-11-18T09:16:13Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mvantellingen/python-zeep/pulls/836","html_url":"https://github.com/mvantellingen/python-zeep/pull/836","diff_url":"https://github.com/mvantellingen/python-zeep/pull/836.diff","patch_url":"https://github.com/mvantellingen/python-zeep/pull/836.patch"},"body":"When log level is set to DEBUG and the webservice returns its response in a content-type different from utf-8, the following exception happens:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  ...\r\n/lib/python3.7/site-packages/zeep/transports.py\", line 78, in post\r\n    log_message = log_message.decode('utf-8')\r\nUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe7 in position 1432: invalid continuation byte\r\n```\r\n\r\n(some of the traceback was deleted for readability purposes)\r\n\r\nThis problem happens because the response enconding is ignored when decoding the response content from bytes to str. In the example above the response encoding is `iso-8859-1`. And this PR solves this issue."},"comment":{"url":"https://api.github.com/repos/mvantellingen/python-zeep/issues/comments/439678508","html_url":"https://github.com/mvantellingen/python-zeep/pull/836#issuecomment-439678508","issue_url":"https://api.github.com/repos/mvantellingen/python-zeep/issues/836","id":439678508,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTY3ODUwOA==","user":{"login":"mvantellingen","id":245297,"node_id":"MDQ6VXNlcjI0NTI5Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/245297?v=4","gravatar_id":"","url":"https://api.github.com/users/mvantellingen","html_url":"https://github.com/mvantellingen","followers_url":"https://api.github.com/users/mvantellingen/followers","following_url":"https://api.github.com/users/mvantellingen/following{/other_user}","gists_url":"https://api.github.com/users/mvantellingen/gists{/gist_id}","starred_url":"https://api.github.com/users/mvantellingen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvantellingen/subscriptions","organizations_url":"https://api.github.com/users/mvantellingen/orgs","repos_url":"https://api.github.com/users/mvantellingen/repos","events_url":"https://api.github.com/users/mvantellingen/events{/privacy}","received_events_url":"https://api.github.com/users/mvantellingen/received_events","type":"User","site_admin":false},"created_at":"2018-11-18T09:16:21Z","updated_at":"2018-11-18T09:16:21Z","author_association":"OWNER","body":"👍 "}}
{"actor":{"display_login":"mvantellingen"}}