[Python-checkins] python/dist/src/Lib _LWPCookieJar.py, 1.2, 1.2.2.1 _MozillaCookieJar.py, 1.3, 1.3.2.1 cookielib.py, 1.4.2.2, 1.4.2.3

loewis at users.sourceforge.net loewis at users.sourceforge.net
Thu Mar 3 11:56:24 CET 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5901/Lib

Modified Files:
      Tag: release24-maint
	_LWPCookieJar.py _MozillaCookieJar.py cookielib.py 
Log Message:
Patch #1117454: Remove code to special-case cookies without values
in LWPCookieJar.


Index: _LWPCookieJar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_LWPCookieJar.py,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -u -d -r1.2 -r1.2.2.1
--- _LWPCookieJar.py	31 Aug 2004 11:38:12 -0000	1.2
+++ _LWPCookieJar.py	3 Mar 2005 10:55:51 -0000	1.2.2.1
@@ -115,13 +115,6 @@
 
                 for data in split_header_words([line]):
                     name, value = data[0]
-                    # name and value are an exception here, since a plain "foo"
-                    # (with no "=", unlike "bar=foo") means a cookie with no
-                    # name and value "foo".  With all other cookie-attributes,
-                    # the situation is reversed: "foo" means an attribute named
-                    # "foo" with no value!
-                    if value is None:
-                        name, value = value, name
                     standard = {}
                     rest = {}
                     for k in boolean_attrs:

Index: _MozillaCookieJar.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_MozillaCookieJar.py,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- _MozillaCookieJar.py	1 Sep 2004 13:10:31 -0000	1.3
+++ _MozillaCookieJar.py	3 Mar 2005 10:55:52 -0000	1.3.2.1
@@ -73,6 +73,9 @@
                 secure = (secure == "TRUE")
                 domain_specified = (domain_specified == "TRUE")
                 if name == "":
+                    # cookies.txt regards 'Set-Cookie: foo' as a cookie
+                    # with no name, whereas cookielib regards it as a
+                    # cookie with no value.
                     name = value
                     value = None
 

Index: cookielib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/cookielib.py,v
retrieving revision 1.4.2.2
retrieving revision 1.4.2.3
diff -u -d -r1.4.2.2 -r1.4.2.3
--- cookielib.py	3 Mar 2005 10:47:38 -0000	1.4.2.2
+++ cookielib.py	3 Mar 2005 10:55:52 -0000	1.4.2.3
@@ -452,11 +452,7 @@
             param = param.rstrip()
             if param == "": continue
             if "=" not in param:
-                if param.lower() in known_attrs:
-                    k, v = param, None
-                else:
-                    # cookie with missing value
-                    k, v = param, None
+                k, v = param, None
             else:
                 k, v = re.split(r"\s*=\s*", param, 1)
                 k = k.lstrip()



More information about the Python-checkins mailing list