remove cases where intern is used. This will prevent a DoS via memory starvation if a lot of requests are sent using random headers

This commit is contained in:
Jay Baird 2009-09-10 13:24:39 -07:00
parent 19c8610eee
commit 2fd2ad6d42
2 changed files with 2 additions and 2 deletions

View File

@ -318,7 +318,7 @@ class HTTPHeaders(dict):
return dict.__getitem__(self, self._normalize_name(name))
def _normalize_name(self, name):
return intern("-".join([w.capitalize() for w in name.split("-")]))
return "-".join([w.capitalize() for w in name.split("-")])
@classmethod
def parse(cls, headers_string):

View File

@ -187,4 +187,4 @@ class HTTPHeaders(dict):
return dict.__getitem__(self, self._normalize_name(name))
def _normalize_name(self, name):
return intern("-".join([w.capitalize() for w in name.split("-")]))
return "-".join([w.capitalize() for w in name.split("-")])