Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Remove HTTP client restriction on cookies #5824

Closed
wants to merge 1 commit into from

Conversation

bakura10
Copy link
Contributor

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
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 fix-http-cookie branch February 13, 2014 17:33
weierophinney added a commit to zendframework/zend-http that referenced this pull request May 15, 2015
…-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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants