Cookies should use rawurlencode instead of urlencode. Added a test that ensures the correct encoding is used.