Merge pull request #113 from kevingy/master

Handle special characters in the incoming referer.
Merge remote-tracking branch 'upstream/master'
Merge pull request #115 from kevingy/master

Issue #114: Handle malformed cookies with invalid names.
Merge remote-tracking branch 'upstream/master'