mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
parent
9b62b39070
commit
4ea3eade51
3 changed files with 30 additions and 5 deletions
|
@ -447,7 +447,7 @@ def parse_ns_headers(ns_headers):
|
|||
for ns_header in ns_headers:
|
||||
pairs = []
|
||||
version_set = False
|
||||
for param in re.split(r";\s*", ns_header):
|
||||
for ii, param in enumerate(re.split(r";\s*", ns_header)):
|
||||
param = param.rstrip()
|
||||
if param == "": continue
|
||||
if "=" not in param:
|
||||
|
@ -459,7 +459,7 @@ def parse_ns_headers(ns_headers):
|
|||
else:
|
||||
k, v = re.split(r"\s*=\s*", param, 1)
|
||||
k = k.lstrip()
|
||||
if k is not None:
|
||||
if ii != 0:
|
||||
lc = k.lower()
|
||||
if lc in known_attrs:
|
||||
k = lc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue