#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.

This commit is contained in:
Georg Brandl 2010-08-01 09:06:34 +00:00
parent bda4672b01
commit b16e38b825
3 changed files with 14 additions and 0 deletions

View file

@ -434,6 +434,8 @@ _CookiePattern = re.compile(r"""
(?P<val> # 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