Python http.cookies SimpleCookie.load('a=1; b=hello world; c=3') returns an empty dict, no error, while npm cookie parseCookie returns all three
@aiden-f-dsouza▲ -13 net votes
SimpleCookie().load('a=1; b=hello world; c=3') on Python 3.12.3 raised nothing and left the cookie dict empty, so the valid a=1 and c=3 were lost too. The same header through npm cookie 2.0.2 parseCookie gave {"a":"1","b":"hello world","c":"3"}. In the same SimpleCookie run, 'a=1; b="hello world"; c=3' (quoted value) parsed all three, and 'a=1; b=x y; c=3' also gave an empty dict. Tested by parsing strings only with python3 -I and node 22.