Re: [Imap-protocol] BINARY + multiparts

Lyndon Nerenberg <[email protected]>
Newsgroups gmane.mail.imap.general
Message-ID <[email protected]>
On 2012-08-10, at 19:39 PM, Timo Sirainen wrote:

> for a message that contains base64-encoded MIME parts. Do you change the MIME headers' Content-Transfer-Encoding value to "binary"? Or do you just return NO to the command? I implemented the former, but the RFC doesn't seem to require it.

If you convert the MIME part to binary encoding, you have to change the CTE header's value, else you have an invalid MIME object.

I was very uncomfortable about this sort of body content re-writing, and wanted to restrict binary fetch to terminal MIME body parts.  In fact, I had thought that's how I had written the spec – shows you how long it's been since I read the RFC.  So either somebody talked me out of that restriction, or I just screwed up and forgot to include it in the document :-P

But given what's there today, "Fetch 1 Binary []" is a valid command in the fact of nested body content, so if it's not too hard to do the CTE rewrite, you might as well do it.  But I would strongly advise client authors to restrict binary fetches to terminal body parts, as the behaviour of fetching non-terminals is going to be unpredictable.

--lyndon

_______________________________________________
Imap-protocol mailing list
[email protected]
http://mailman2.u.washington.edu/mailman/listinfo/imap-protocol
signature.asc (application/pgp-signature, 841 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)

iQIcBAEBAgAGBQJQJn2mAAoJEG8PnXiV/JnUEDAQAJd6ULIzt1VqW7h/xIL3Qtx3
oWXIw5erYM4U/M7vQRw824qyHhcFMJCkKWbrSorpJnk1XFn89D2Gw4FpnyBh1iWc
zsVQVbdysSJj0HRb8FJD4UAH9GyjixDVrCppSIrlj/4TNX2XUU5l4zrjs+63Fcy3
xip69mXGVOBxO91i+ZAFNFULy8a1ULTkNMf9OCNpCZR/e1Xv1OvY5GD2VNg2rFBj
+vEB7TteTMiFPEFAqbsdqxPiJwnLwhpyxPyVPX+kFEnj5pEx3ipsRNhAK34rjNzv
rh/umb8NkWBXYyF6s9KKmWqqIc0MSYxjG/AMSP8P+rkpyTq3xLO7Q0YrCgqUh7J9
Lo8yFeNxpmTyEO+e4qd4UWqBjqKxeyPrExFnJBZauNOZULyRtL3LVa0M7Vfyzekx
i6Da95M9u5UQZeKbVo+bFUiKAsPKsij2qrjkUqwkohnL4p0lz0XHnz3PSwE5jioO
QKWMzbg8SLuahyMuw2Ud5ZvTZoeQE9bGXqkTgoby+L4X7n+6/4aLxmL+0H9j5DKW
Z3KRmq9zvwrouA/L5Qg+WuYqDSLNOP88urICS0K7qD0TK+8fiWyZYdrIUQtES29V
73wvNd7iIJW/S3qXbcsjVTdlpAT9ziV6uRWIarL8SZDFuwyWo3VORWrytjFrhRoH
6T3zSg4Ox0xyWw0ohGgx
=NmTI
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.