Message 81100 - Python tracker (original) (raw)
It seems that in the MozillaCookieJar library, the author accidently indented the long string that represents the magic header of the Netscape compatible cookie file. This is not a problem for MozillaCookieJar as the regex to test the magic header is not bound to the beginning of the line.
Other libraries, however, may bind the pattern match to the beginning of the line, such as perl's HTTP::Cookies::Netscape.
For better compatibility of Netscape cookies files, the magic header must not be indented.
Index: svn-python-lib/_MozillaCookieJar.py
--- svn-python-lib/_MozillaCookieJar.py (revision 69261) +++ svn-python-lib/_MozillaCookieJar.py (working copy) @@ -38,9 +38,9 @@ """ magic_re = "#( Netscape)? HTTP Cookie File" header = """\
Netscape HTTP Cookie File
http://www.netscape.com/newsref/std/cookie_spec.html
This is a generated file! Do not edit.
+# Netscape HTTP Cookie File +# http://www.netscape.com/newsref/std/cookie_spec.html +# This is a generated file! Do not edit.
"""