changeset: 94188:0d8380c493ad branch: 3.4 parent: 94186:992ce0dcfb29 user: Benjamin Peterson date: Fri Jan 16 20:43:55 2015 -0500 files: Lib/http/cookies.py Lib/test/test_http_cookies.py Misc/NEWS description: capitialize "HttpOnly" and "Secure" as they appear in the standard and other impls (closes #23250) Patch by Jon Dufresne. diff -r 992ce0dcfb29 -r 0d8380c493ad Lib/http/cookies.py --- a/Lib/http/cookies.py Thu Jan 15 22:52:59 2015 +0100 +++ b/Lib/http/cookies.py Fri Jan 16 20:43:55 2015 -0500 @@ -330,8 +330,8 @@ "comment" : "Comment", "domain" : "Domain", "max-age" : "Max-Age", - "secure" : "secure", - "httponly" : "httponly", + "secure" : "Secure", + "httponly" : "HttpOnly", "version" : "Version", } diff -r 992ce0dcfb29 -r 0d8380c493ad Lib/test/test_http_cookies.py --- a/Lib/test/test_http_cookies.py Thu Jan 15 22:52:59 2015 +0100 +++ b/Lib/test/test_http_cookies.py Fri Jan 16 20:43:55 2015 -0500 @@ -114,7 +114,7 @@ C['Customer']['secure'] = True C['Customer']['httponly'] = True self.assertEqual(C.output(), - 'Set-Cookie: Customer="WILE_E_COYOTE"; httponly; secure') + 'Set-Cookie: Customer="WILE_E_COYOTE"; HttpOnly; Secure') def test_secure_httponly_false_if_not_present(self): C = cookies.SimpleCookie() @@ -152,7 +152,7 @@ C = cookies.SimpleCookie() C.load('eggs = scrambled ; secure ; path = bar ; foo=foo ') self.assertEqual(C.output(), - 'Set-Cookie: eggs=scrambled; Path=bar; secure\r\nSet-Cookie: foo=foo') + 'Set-Cookie: eggs=scrambled; Path=bar; Secure\r\nSet-Cookie: foo=foo') def test_quoted_meta(self): # Try cookie with quoted meta-data diff -r 992ce0dcfb29 -r 0d8380c493ad Misc/NEWS --- a/Misc/NEWS Thu Jan 15 22:52:59 2015 +0100 +++ b/Misc/NEWS Fri Jan 16 20:43:55 2015 -0500 @@ -44,6 +44,9 @@ Library ------- +- Issue #23250: In the http.cookies module, capitalize "HttpOnly" and "Secure" + as they are written in the standard. + - Issue #23063: In the disutils' check command, fix parsing of reST with code or code-block directives.