Commit edaacc41 authored by Ian Clelland's avatar Ian Clelland Committed by Luke Plant
Browse files

[1.5.x] Don't use : as an invalid cookie character

Since http://bugs.python.org/issue2193 has been resolved in favour of
the colon in cookie names, we need to test invalid cookie removal using
a different character. "@" is still considered invalid by all sources.

Backport of 419e2137fabdcadadc728cb9bd94af929157dc3b from master
parent 7b697855
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ class RequestsTests(unittest.TestCase):
                         str_prefix("<WSGIRequest\npath:/otherpath/,\nGET:{%(_)s'a': %(_)s'b'},\nPOST:{%(_)s'c': %(_)s'd'},\nCOOKIES:{%(_)s'e': %(_)s'f'},\nMETA:{%(_)s'g': %(_)s'h'}>"))

    def test_parse_cookie(self):
        self.assertEqual(parse_cookie('invalid:key=true'), {})
        self.assertEqual(parse_cookie('invalid@key=true'), {})

    def test_httprequest_location(self):
        request = HttpRequest()