From b16e38b8254e0e1bbffaf16971351a5eb31a5846 Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 1 Aug 2010 09:06:34 +0000 Subject: #8826: the "expires" attribute value is a date string with spaces, but apparently not all user-agents put it in quotes. Handle that as a special case. --- Lib/http/cookies.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/http/cookies.py') diff --git a/Lib/http/cookies.py b/Lib/http/cookies.py index c36c494579..9e51b6791c 100644 --- a/Lib/http/cookies.py +++ b/Lib/http/cookies.py @@ -434,6 +434,8 @@ _CookiePattern = re.compile(r""" (?P # Start of group 'val' "(?:[^\\"]|\\.)*" # Any doublequoted string | # or + \w{3},\s[\w\d-]{9,11}\s[\d:]{8}\sGMT # Special case for "expires" attr + | # or """ + _LegalCharsPatt + r"""* # Any word or empty string ) # End of group 'val' \s*;? # Probably ending in a semi-colon -- cgit v1.2.1