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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)