Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Remove HTTP client restriction on cookies #5824

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

bakura10 commented Feb 13, 2014

Hi,

I've been encountering a strange issue today with Zend Http client. I was doing an OAuth authorization call to Stripe API (https://stripe.com/docs/connect/reference#post-token), but had the following error:

Zend\Http\Header\Exception\InvalidArgumentException:
Cookie name cannot contain these characters: =,; \t\r\n\013\014 (session=)

After lot of debugging, it appeared that Stripe sent three cookies: http://cl.ly/image/2E232m072h47

The first one is the problematic one because it uses "=". Removing the check make it works.

Please note that I couldn't find a clear documentation that stated that all those characters were not allowed. Furthermore, I tried the exact same call using another PHP client (Guzzle) and it worked without any issue, so I suppose they do not make this check. Lastly, this feature was not tested at all so I suppose it's safe to remove this check.

(I've tried to check on the Internet if other Stripe users had this problem in other languages, and couldn't find anything)

weierophinney added a commit that referenced this pull request Feb 13, 2014

Merge pull request #5824 from bakura10/fix-http-cookie
Remove HTTP client restriction on cookies

weierophinney added a commit that referenced this pull request Feb 13, 2014

@weierophinney weierophinney added this to the 2.2.6 milestone Feb 13, 2014

@weierophinney weierophinney self-assigned this Feb 13, 2014

@bakura10 bakura10 deleted the bakura10:fix-http-cookie branch Feb 13, 2014

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

Merge pull request zendframework/zendframework#5824 from bakura10/fix…
…-http-cookie

Remove HTTP client restriction on cookies

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment