【发布时间】:2011-07-22 15:25:21
【问题描述】:
我正在尝试在我的项目中包含外部 python 模块以处理会话。它被命名为gmemsess.py。它尝试在响应中添加 Set-Cookie 标头并出现错误:
rh.response.headers.add_header('Set-Cookie','%s=%s; path=/;'%(name,self._sid))
AttributeError: HeaderDict instance has no attribute 'add_header'
我阅读了文档,一切似乎都很好,但它不起作用。为什么会出现这个错误? 另外,我使用 webapp2 来管理子域。会不会因此而出现问题?
【问题讨论】:
标签: python google-app-engine session webapp2