Commit 4be63d17 authored by Guido van Rossum's avatar Guido van Rossum

Added getparamnames() to Message class -- return a list of all

parameters of the content-type header.
parent 8299e468
......@@ -67,6 +67,14 @@ class Message(rfc822.Message):
return rfc822.unquote(p[n:])
return None
def getparamnames(self):
result = []
for p in self.plist:
i = string.find(p, '=')
if i >= 0:
result.append(string.lower(p[:i]))
return result
def getencoding(self):
if self.encodingheader == None:
return '7bit'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment