mixedpuppy <[EMAIL PROTECTED]> added the comment: The problem is that spaces are not allowed in the attribute values. Here is a work around
# hack fix of Cookie.BasicCookie import Cookie import re _LegalCharsPatt = r"\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=" _FixedCookiePattern = re.compile( r"(?x)" # This is a Verbose pattern r"(?P<key>" # Start of group 'key' "["+ _LegalCharsPatt +"]+?" # Any word of at least one letter, nongreedy r")" # End of group 'key' r"\s*=\s*" # Equal Sign r"(?P<val>" # Start of group 'val' r'"(?:[^\\"]|\\.)*"' # Any doublequoted string r"|" # or "["+ _LegalCharsPatt +"\ ]*" # Any word or empty string r")" # End of group 'val' r"\s*;?" # Probably ending in a semi-colon ) class FixedCookie(Cookie.SimpleCookie): def load(self, rawdata): """Load cookies from a string (presumably HTTP_COOKIE) or from a dictionary. Loading cookies from a dictionary 'd' is equivalent to calling: map(Cookie.__setitem__, d.keys(), d.values()) """ if type(rawdata) == type(""): self._BaseCookie__ParseString(rawdata, _FixedCookiePattern) else: self.update(rawdata) return ---------- nosy: +mixedpuppy _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3073> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com