Based on documentation, (*Reader).NextPart should return the unmodified next part in a multipart message. Instead, it removes the Content-Transfer-Encoding header and decodes the body automatically when its value is quoted-printable.
This seems rather uncalled for, given that:
- RFC 2045 Section 6.7 indicates: "[...] encoded in Quoted-Printable to ensure
the integrity of the data [...]". The current behavior does not ensure integrity.
- Users of this package could access the
Content-Transfer-Encoding header themselves and use the already existent mime/quotedprintable package.
Because data integrity is breached, this pretty much renders it impossible to use the mime/multipart package to implement a reliable IMAP server.
The proposal suggests removing this functionality and preserving the unmodified header and body. Users will be able to decode such bodies themselves when necessary by reading the Content-Transfer-Encoding header and using the mime/quotedprintable package, while also having access to the original message.
Based on documentation, (*Reader).NextPart should return the unmodified next part in a multipart message. Instead, it removes the
Content-Transfer-Encodingheader and decodes the body automatically when its value isquoted-printable.This seems rather uncalled for, given that:
the integrity of the data [...]". The current behavior does not ensure integrity.
Content-Transfer-Encodingheader themselves and use the already existent mime/quotedprintable package.Because data integrity is breached, this pretty much renders it impossible to use the
mime/multipartpackage to implement a reliable IMAP server.The proposal suggests removing this functionality and preserving the unmodified header and body. Users will be able to decode such bodies themselves when necessary by reading the
Content-Transfer-Encodingheader and using themime/quotedprintablepackage, while also having access to the original message.