Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
HTTP Set-Cookie parser does not handle trailing semicolons #731
Header parser in parse_set_cookie() bails out on a cookie header with a trailing semicolon, like...
...because an attribute is expected to follow the semicolon:
while s:sub(pos, pos) == ";" do pos = pos + 1 pos = skip_space(s, pos) pos, name = get_token(s, pos) if not name then return nil, string.format("Can't get attribute name of cookie \"%s\".", cookie.name) end ...
The following patch resolves the issue:
Please let me know if you have any questions or concerns. Otherwise I will commit the patch in a few weeks.