tickets: 8122
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8122 | 2008-08-05 15:15:18 | 2014-06-13 18:03:04 | 2022-03-06 03:41:25.474105 | Accepted | new | contrib.sessions | Cleanup/optimization | Normal | dev | Better way of testing for cookies | While trying to get the cookie test in the login form working again by default (see ticket #8061) I think I found a way to get rid of the {{{set_test_cookie()}}} / {{{test_cookie_worked()}}} dance. The attached patch makes the session middleware set an ''empty'' cookie if the session does not yet have any variables set. This makes it possible to check whether the browser accepts cookies without poluting the session store. You can check for cookies using {{{accepts_cookies()}}} method. The old methods are marked deprecated but still work. | nobody | jcassee | 0 | 1 | 1 | 0 | 0 | 0 |