summaryrefslogtreecommitdiffstats
path: root/Lib/cookielib.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2005-03-03 10:48:12 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2005-03-03 10:48:12 (GMT)
commit4ea3eade518c6a48b0708736442deefe669fe287 (patch)
treeb1fe49fc925e2c4cbb51793042c182582fe8d87f /Lib/cookielib.py
parent9b62b3907056bedc83e7a2198eec722c84d7c473 (diff)
downloadcpython-4ea3eade518c6a48b0708736442deefe669fe287.zip
cpython-4ea3eade518c6a48b0708736442deefe669fe287.tar.gz
cpython-4ea3eade518c6a48b0708736442deefe669fe287.tar.bz2
Patch #1117339: Add cookielib special name tests.
Backported to 2.4.
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