statianzo/Fleck — pull request #114 by draylundy (2014-10-23 17:35:30+00:00)
Title: Fix parsing of Cookie header without spaces

Duplicate of issue #77 .

The issue arises when the cookie string is sent in without a space between the terminating semi-colon of one key-value pair and the beginning of the next key-value pair.

Due to the first unnamed capturing group being defined as a semi-colon followed by a white-space, a semi-colon without following white-space will not be captured, leaving it to be captured by the cookie-name group. This is why all cookies after the first one have a semi-colon as the first character of the key when there are no spaces.

Modified the Regex to capture 0 or more semi-colons and 0 or more whitespace characters independently.