parse_cookie("foo=bar; ; abc=def")
{'foo': 'bar', '; abc': 'def'}
As you can see, instead of a cookie named abc, there is one named ; abc. I came across this problem when I accidentally added an empty cookie in Chrome by calling document.cookie = "" from Javascript. Chrome then sent a Cookie header similar to the one above, which caused another cookie not to be found anymore.
As you can see, instead of a cookie named
abc, there is one named; abc. I came across this problem when I accidentally added an empty cookie in Chrome by callingdocument.cookie = ""from Javascript. Chrome then sent aCookieheader similar to the one above, which caused another cookie not to be found anymore.