summaryrefslogtreecommitdiffstats
path: root/Lib/cookielib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/cookielib.py')
-rw-r--r--Lib/cookielib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/cookielib.py b/Lib/cookielib.py
index 7fec858..49989b4 100644
--- a/Lib/cookielib.py
+++ b/Lib/cookielib.py
@@ -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