Mailing List Archive

[issue5147] MozillaCookieJar should not store leading whitespace in Magic header
New submission from Ajith Antony <ajith.antony@gmail.com>:

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.

"""

----------
components: Library (Lib)
messages: 81100
nosy: aantony
severity: normal
status: open
title: MozillaCookieJar should not store leading whitespace in Magic header
type: behavior
versions: Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue5147>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com