I'm using Pylons and having issues with response.set_cookie

放肆的年华 提交于 2019-12-04 17:04:24

Its because of the newer version of webob.

The webob package in pylons 0.9.7 is ~0.9.8, which does not escape cookie values.

Somewhere between then and now, webob started escaping the values, which is causing your 'new' version to fail. If you dig into the webob codebase (newer version), this is happening in the serialize() method of Cookie where it ensures that the values are escaped properly. The old version was setting these values directly and was not escaping on serializing.

I have a similar setup with 0.9.7 running in virtualenv, so was able to reproduce this behavior on my system.

As far as you use methods from same version, they should also be unescaping the values in request so things should be fine.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!