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:
parent
19c8610eee
commit
2fd2ad6d42
|
@ -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):
|
||||
|
|
|
@ -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("-")])
|
||||
|
|
Loading…
Reference in New Issue