changeset 39:ed5af0f0028d

Add support for the {{{Content-Disposition}}} and {{{Content-Transfer-Encoding}}} MIME headers.
author cmlenz
date Thu, 23 Jun 2005 20:31:03 +0000
parents 49eaa98230c5
children ee31ef783afd
files bitten/util/beep.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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))
 
 
Copyright (C) 2012-2017 Edgewall Software