【发布时间】:2010-09-09 23:59:53
【问题描述】:
我正在尝试在我的 Google App Engine 页面中设置 cookie:
self.response.headers.add_header('Set-Cookie','CookieName=1234; expires:Sun, 31-May-2009 23:59:59 GMT; path=/;')
到期日期未显示在浏览器中。因此,它会在会话结束时自行删除。
这是 curl -D 的输出:
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Cache-Control: no-cache
Set-Cookie: CookieName=1234; expires:Fri, 01 Jan 2010 11:48:41 GMT
Date: Fri, 08 May 2009 11:57:25 GMT
Server: Google Frontend
Expires: Fri, 08 May 2009 11:57:25 GMT
Transfer-Encoding: chunked
我错过了什么?
【问题讨论】: