This is an improvement over the original implementation because the previous behaviour was to discard the entire set of request cookies if a phantom cookie was encountered, which is probably never the result we want.
Note this still buckles under a=1; (notice the trailing space). This could be solved by trimming the cookie before the comparison to the empty string, but this is left as an exercise for someone who gives more of a shit than I currently do.
This is an improvement over the original implementation because the previous behaviour was to discard the entire set of request cookies if a phantom cookie was encountered, which is probably never the result we want.
Note this still buckles under
a=1;
(notice the trailing space). This could be solved by trimming the cookie before the comparison to the empty string, but this is left as an exercise for someone who gives more of a shit than I currently do.