Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to turn of quoting of cookies #1405

Closed
dvaeversted opened this issue Feb 17, 2016 · 3 comments
Closed

Possibility to turn of quoting of cookies #1405

dvaeversted opened this issue Feb 17, 2016 · 3 comments
Labels

Comments

@dvaeversted
Copy link
Contributor

I am currently using Guzzle for interfacing with a webservice, where i need a session cookie that contains a "=" sign.
Unfortunately this webservice does not support quoted cookie values, which is done in the CookieJar::getCookieValue() method.

Possible solutions:

  1. Don't escape because of a = sign
  2. Allow overwriting the getCookieValue() method, by modifying the call in CookieHeader::withCookieHeader() to utilize late static binding.

For now i had to completely re-implement the CookieJarInterface, for my use case to work.

@mtdowling
Copy link
Member

Hm... I'm open to changing the behavior here.

I wonder if we should be quoting at all. What does the cookie spec say? I wonder what other HTTP implementations do... For example, Firefox, Chrome, other PHP packages, etc.

@dvaeversted
Copy link
Contributor Author

While using the webservice through either Firefox or Chrome, neither of them escapes the cookie data.

The RFC does allow escaping, but i think the correct way would be to only escape if the server also sends it escaped.

@mtdowling
Copy link
Member

Thanks. I'm be open to changing it to match other prominent implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants