Commit 92f79504 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Jérome Perrin

Zope4: cookie value is no longer quoted.

parent 1dc58a1f
...@@ -420,8 +420,10 @@ class TestOAuth2(ERP5TypeTestCase): ...@@ -420,8 +420,10 @@ class TestOAuth2(ERP5TypeTestCase):
if key == 'set-cookie': if key == 'set-cookie':
# XXX: minimal Set-Cookie parser # XXX: minimal Set-Cookie parser
cookie_name, cookie_body = value.split('=', 1) cookie_name, cookie_body = value.split('=', 1)
assert cookie_body[0] == '"', repr(cookie_body) # RFC6265 makes quoting obsolete
cookie_value, cookie_attributes = cookie_body[1:].split('"', 1) # assert cookie_body[0] == '"', repr(cookie_body)
cookie_value, cookie_attributes = cookie_body.split(';', 1)
cookie_value = cookie_value.strip('"')
cookie_value_dict = { cookie_value_dict = {
'value': urllib.unquote(cookie_value), 'value': urllib.unquote(cookie_value),
} }
......
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