Roundup Tracker - Issues

Issue 2551004

classification
MailGW transcodes application/octet-stream
Type: behavior Severity: major
Components: Mail interface Versions: devel
process
Status: fixed fixed
:
: : joseph_myers, schlatterbeck
Priority: : python2

Created on 2018-09-25 14:48 by schlatterbeck, last changed 2018-09-26 01:27 by joseph_myers.

Messages
msg6257 Author: [hidden] (schlatterbeck) Date: 2018-09-25 14:48
When attaching an application/octet-stream Content-Type, the roundup
mailgw should leave the attachment unchanged, in particular it should
not try to transcode to utf-8.

I'm observing a transcoding of an application/octet-stream attachement
(in latin-1 encoding).

I'll try to come up with a test for this.

Note that this worked (was not transcoded) in 1.6.0 (before the changes
to the mail gateway).

I'm testing with python2.7 but assume this also happens with python3

Joseph, hope it's ok for you that I've put you on nosy.
msg6258 Author: [hidden] (schlatterbeck) Date: 2018-09-25 15:07
Added a failing test for this transcoding issue in commit 4523fe3cf04c
(and marked the test as failing in 52e50ab5dfda) sorry for the two
commits, but maybe the second one can later be reverted when everything
works again.
msg6260 Author: [hidden] (joseph_myers) Date: 2018-09-26 01:27
I've applied a fix for this issue (only transcoding if a charset is
specified or a text/* content-type, with consequent updates to various
tests to use b'' byte-strings for the expected contents of binary
attachments).
History
Date User Action Args
2018-09-26 01:27:35joseph_myerssetstatus: new -> fixed
resolution: fixed
messages: + msg6260
2018-09-25 15:07:53schlatterbecksetmessages: + msg6258
2018-09-25 14:48:08schlatterbeckcreate