Re: Generating zipped or gzipped attachment with emailpackage?

"Stephen J. Turnbull" <[email protected]>
Newsgroups gmane.comp.python.mime.devel
Message-ID <[email protected]>
Mark Sapiro writes:

 > Ideally, one would be able to specify a parameter on the Content-Type;
 > header along the lines of
 > 
 > Content-Type: text/csv; charset="utf-8"; compression="gzip"

No, I think this is really a content transfer encoding, not part of
Content-Type, and I don't see why one would be enough.  Nor would it
necessarily always be compression.

So how about a Content-Transfer-Filter header which resolves to an
(order-sensitive!) list of transformations:

Content-Transfer-Filter: pgp-encrypted; algorithm=idea; order=3
Content-Transfer-Filter: x-xz; order=2; comment="the successor to LZMA";
  alternate-application=x-lzma
Content-Transfer-Filter: base64; order=1

Order is "decoding order" here.  Otherwise you'd need a parameter to
determine which to use first (in case of corruption or reordering by
some brain-damaged MUA or MTA).

In the presence of a Content-Transfer-Encoding header, the
Content-Transfer-Encoding should be applied first, then any
Content-Transfer-Filters.
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.