Both of these set a cookie that contains a unicode value, however as my comment on issue #104: #104 (comment) shows this is not valid for a cookie value.
I am working on refactoring response.set_cookie() because of issue #166 and changed it to use cookies.make_cookie() which does not allow setting unicode values, since it correctly follows the spec and tries to encode the values to ascii.
I'm going to be breaking that feature in my next pull request, technically bringing WebOb inline with the RFC's, however I am unsure of how many things this will break, so the question is if we want to have a depreciation time.
Some suggestions: we can uri encode the value, which would bring the cookie value into spec, and this is recommended by some stackoverflow posts on the subject.
The text was updated successfully, but these errors were encountered:
In
test_response.py
we have the following tests:https://github.com/Pylons/webob/blob/master/tests/test_response.py#L112-115
https://github.com/Pylons/webob/blob/master/tests/test_response.py#L686-690
Both of these set a cookie that contains a unicode value, however as my comment on issue #104: #104 (comment) shows this is not valid for a cookie value.
I am working on refactoring
response.set_cookie()
because of issue #166 and changed it to usecookies.make_cookie()
which does not allow setting unicode values, since it correctly follows the spec and tries to encode the values toascii
.I'm going to be breaking that feature in my next pull request, technically bringing WebOb inline with the RFC's, however I am unsure of how many things this will break, so the question is if we want to have a depreciation time.
Some suggestions: we can uri encode the value, which would bring the cookie value into spec, and this is recommended by some stackoverflow posts on the subject.
The text was updated successfully, but these errors were encountered: