# HG changeset patch # User Pathangi Jatinshravan # Date 1444148647 -28800 # Wed Oct 07 00:24:07 2015 +0800 # Node ID 54461703ec8325098292448bbae8afdcea457970 # Parent 41f29bbf520d635004aff1e3ffddf1503b204e97 Fixes issue where subsequent cookie values were ignored if one cookie value was invalid. diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py --- a/Lib/http/cookies.py +++ b/Lib/http/cookies.py @@ -576,8 +576,15 @@ # Start looking for a cookie match = patt.match(str, i) if not match: - # No more cookies - break + if ';' not in str: + break + + else: + while not str[i] == ';': + i += 1 + + i += 1 + continue key, value = match.group("key"), match.group("val") i = match.end(0)