This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Tim.Graham
Recipients Tim.Graham, berker.peksag, georg.brandl, pitrou, r.david.murray
Date 2014-10-29.10:14:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I noticed some failing Django tests on Python 3.2.6 the other day. The regression is caused by this change:

Behavior before that commit (and on other version of Python even after that commit):

>>> from http.cookies import SimpleCookie
>>> SimpleCookie("Set-Cookie: foo=bar; Path=/")
<SimpleCookie: foo='bar'>

New broken behavior on Python 3.2.6:

>>> from http.cookies import SimpleCookie
>>> SimpleCookie("Set-Cookie: foo=bar; Path=/")
<SimpleCookie: >

Python 3.2.6 no longer accepts the "Set-Cookie: " prefix to BaseCookie.load:

>>> SimpleCookie("Set-Cookie: foo=bar; Path=/")
<SimpleCookie: >
>>> SimpleCookie("foo=bar; Path=/")
<SimpleCookie: foo='bar'>

This issue doesn't affect 2.7, 3.3, or 3.4 because of (this commit wasn't backported to 3.2 because that branch is in security-fix-only mode).

I asked Berker about this and he suggested to create this issue and said, "If Georg is OK to backout the commit I can write a patch with additional test cases and commit it."

He also confirmed the regression as follows:

I've tested your example on Python 2.7.8, 3.2.6, 3.3.6, 3.4.2, 3.5.0 (all unreleased development versions - they will be X.Y.Z+1) and looks like it's a regression.

My test script is:

        from http.cookies import SimpleCookie
    except ImportError:
        from Cookie import SimpleCookie

    c = SimpleCookie("Set-Cookie: foo=bar; Path=/")

Here are the results:

Python 2.7.8:
Set-Cookie: foo=bar; Path=/

Python 3.5.0:
Set-Cookie: foo=bar; Path=/

Python 3.4.2:
Set-Cookie: foo=bar; Path=/

Python 3.3.6:
Set-Cookie: foo=bar; Path=/
[45602 refs]

Python 3.2.6:

[38937 refs]
Date User Action Args
2014-10-29 10:14:38Tim.Grahamsetrecipients: + Tim.Graham, georg.brandl, pitrou, r.david.murray, berker.peksag
2014-10-29 10:14:37Tim.Grahamsetmessageid: <>
2014-10-29 10:14:37Tim.Grahamlinkissue22758 messages
2014-10-29 10:14:37Tim.Grahamcreate