mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Added getparamnames() to Message class -- return a list of all
parameters of the content-type header.
This commit is contained in:
parent
8299e46831
commit
4be63d1725
1 changed files with 8 additions and 0 deletions
|
|
@ -67,6 +67,14 @@ def getparam(self, name):
|
|||
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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue