我使用了这个请求
GET /logout HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: th,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate
Cookie: session=eyJ1c2VyIjoiYSJ9.DZun3A.LwCROrj6GQicP1v063cYcItu8SQ;
Connection: close
Upgrade-Insecure-Requests: 1
我在flask python3中使用session.clear()
我得到了响应
HTTP/1.0 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 4
Set-Cookie: session=; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/
Server: Werkzeug/0.12.2 Python/3.6.3
Date: Tue, 27 Mar 2018 10:18:30 GMT
它只是设置了一个新的cookie。然后我在设置一个新的cookie之前使用旧的cookie,但是我还有旧会话如何删除旧会话?