fixed Cookie parsing stopped after first invalid cookie #1084, thanks paultuckey
This commit is contained in:
+7
-4
@@ -423,10 +423,13 @@ def wsgibase(environ, responder):
|
||||
# ##################################################
|
||||
|
||||
if env.http_cookie:
|
||||
try:
|
||||
request.cookies.load(env.http_cookie)
|
||||
except Cookie.CookieError, e:
|
||||
pass # invalid cookies
|
||||
for single_cookie in env.http_cookie.split(';'):
|
||||
single_cookie = single_cookie.strip()
|
||||
if single_cookie:
|
||||
try:
|
||||
request.cookies.load(single_cookie)
|
||||
except Cookie.CookieError:
|
||||
pass # single invalid cookie ignore
|
||||
|
||||
# ##################################################
|
||||
# try load session or create new session file
|
||||
|
||||
Reference in New Issue
Block a user