Sort header names for a predictable result

This commit is contained in:
Henrik Nordstrom 2011-02-01 16:44:53 +01:00
parent bd01126b2b
commit 4cf3392e50
1 changed files with 1 additions and 1 deletions

View File

@ -236,7 +236,7 @@ class Headers(MultiDict):
Returns a string containing a formatted header string. Returns a string containing a formatted header string.
""" """
headerElements = [] headerElements = []
for key in self.keys(): for key in sorted(self.keys()):
for val in self[key]: for val in self[key]:
headerElements.append(key + ": " + val) headerElements.append(key + ": " + val)
headerElements.append("") headerElements.append("")