Commit 58026b9c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Revert "Zope4: response.cookies format is different in Zope >= 4.8."

This reverts commit 17346560.
parent b5f8a862
......@@ -464,13 +464,12 @@ class TestOAuth2(ERP5TypeTestCase):
))
if response.body:
response.headers.setdefault('content-type', 'text/html; charset=utf-8')
# response.cookies can contain 'max_age': 0 in Zope < 4.8 but 'Max-Age': '0' in Zope >= 4.8.
return (
response.status,
response_header_dict,
{
name: (
cookie_dict if cookie_dict.get('max_age', cookie_dict.get('Max-Age')) not in (0, '0') else
cookie_dict if cookie_dict.get('max_age', True) else
None
) for name, cookie_dict in six.iteritems(cookie_dict)
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment