This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author r.david.murray
Recipients barry, brandon-rhodes, r.david.murray
Date 2014-03-27.18:49:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1395946154.29.0.421358809951.issue21079@psf.upfronthosting.co.za>
In-reply-to
Content
That facility already mostly exists.  The bug is that the code in question doesn't use it.

>>> m['Content-Disposition'].content_disposition
'attachment'
>>> m['Content-Disposition'].params
{'filename': 'attachment.gz'}

On the other hand, looking at that it is obvious there should be a generic 'value' attribute on all MIME headers so that that could be written:

m['Content-Disposition'].value == 'attachment'

where value would be the 'canonical form' of the value for that header when there is one, including normalizing the case.  Some headers still want specialized attributes (Content-Type's maintype and subtype, for example), but there is always the value/params split, and that ought to be accessible generically and currently isn't.

This is why this stuff is still provisional :)
History
Date User Action Args
2014-03-27 18:49:14r.david.murraysetrecipients: + r.david.murray, barry, brandon-rhodes
2014-03-27 18:49:14r.david.murraysetmessageid: <1395946154.29.0.421358809951.issue21079@psf.upfronthosting.co.za>
2014-03-27 18:49:14r.david.murraylinkissue21079 messages
2014-03-27 18:49:14r.david.murraycreate