Issues

ZF-10936: CookieJar doesn't allow to disable encoding of cookies.

Description

When cookies are added normally througt Zend_Http_Client, (e.g. Zend_Http_Client::setCookie()) then Zend_Http_Client::fromString() is used which offers the option to disable encoding through the $encodeValue parameter.

However, when a Zend_Http_CookieJar is used, cookies are set through Zend_Http_CookieJar::addCookie(), which doesn't offer the option. The result being that if you use a CookieJar, you have no control over whether or not the cookies are encoded. This is a problem since CookieJar::addCookiesFromResponse() sets cookies from strings using Zend_Http_CookieJar::addCookie().

This can be fixed in a backwards compatible manner by giving addCookie() an extra optional parameters that allows to define whether the value should be encoded.

Comments

No comments to display