Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cookie value when using response.set_cookie() can be Unicode against spec #171

bertjwregeer opened this issue Nov 9, 2014 · 0 comments


Copy link

In we have the following tests:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant