# HG changeset patch # User cmlenz # Date 1119558663 0 # Node ID ed5af0f0028d75206e1227dd91afd8b467727ed2 # Parent 49eaa98230c535b25f5a2eadfbbdc6d21eb3841c Add support for the {{{Content-Disposition}}} and {{{Content-Transfer-Encoding}}} MIME headers. diff --git a/bitten/util/beep.py b/bitten/util/beep.py --- a/bitten/util/beep.py +++ b/bitten/util/beep.py @@ -718,12 +718,17 @@ """Simplified construction of generic MIME messages for transmission as payload with BEEP.""" - def __init__(self, payload, content_type=BEEP_XML): + def __init__(self, payload, content_type=BEEP_XML, content_disposition=None, + content_encoding=None): """Create the MIME message.""" Message.__init__(self) if content_type: self.set_type(content_type) del self['MIME-Version'] + if content_disposition: + self['Content-Disposition'] = content_disposition + if content_encoding: + self['Content-Transfer-Encoding'] = content_encoding self.set_payload(str(payload))