Re[2]: [PEAR-DEV] a cookie handling patch for HTTP_Request
| From: | Alexey Borzov | Date: | Wed, 18 Sep 2002 12:42:44 +0000 |
| Subject: | Re[2]: [PEAR-DEV] a cookie handling patch for HTTP_Request | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9155@lists.php.net to get a copy of this message | ||
Greetings, Martin!
At 18.09.2002, 13:07, you wrote:
MJ> On Wed Sep 11, 2002 at 03:3351PM +0400, Alexey Borzov wrote:
>> I tried to use HTTP_Request/HTTP_Response classes in my project and
>> found out that they did not work quite well with cookies set in server's
>> response. HTTP_Response kept all response headers in associative array
>> (header name => header value). As the response can contain _multiple_
>> Set-Cookie headers, their values got overwritten. Besides, there
>> was no easy way to add cookies to request or to extract their
>> values from response.
>>
>> This patch adds two methods: addCookie() and getResponseCookies()
>> to HTTP_Request class and Set-Cookie parsing logic to
>> HTTP_Response's constructor. Cookies are kept (and returned via
>> getResponseCookies()) in an array with numerical keys (as multiple
>> cookies can have the same name).
MJ> The patch looks fine for me. What do the maintainers think?
The maintainer thinks the same, the patch is already in CVS and
HTTP_Request 1.0.2 was released including it. :]
--
С уважением, Алексей Борзов
отдел интернет-проектов ООО "РДВ-Медиа"
http://www.rdw.ru
http://www.vashdosug.ru