Issues

ZF-4802: setCookie() concats the the new cookie to the previous header cookie string

Issue Type: Bug Created: 2008-11-05T07:07:12.000+0000 Last Updated: 2008-11-13T14:10:09.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Eddo Rotman (karnaf) Assignee: Stefan Koopmanschap (stefan) Tags: - Zend_Http_Client

Related issues: Attachments:

Description

Add a cookie using the setHeaders() function, then add another cookie using setCookie() - they end up being a single value

Reproduction code:

<pre class="highlight">
<?php
require_once 'Zend/Http/Client.php';

$client = new Zend_Http_Client();
$client->setHeaders(array('cookie' => 'are you'));
$client->setCookie('funky', 'monkey');

echo $client->getHeader('cookie'); // will output "are youfunky=monkey; " instead of "are you; funky=monkey; "

Comments

Posted by Stefan Koopmanschap (stefan) on 2008-11-08T05:31:52.000+0000

Fixed in revision 12425. Added a check if cookie seperator is present in the string, if not, add it.

Posted by Stefan Koopmanschap (stefan) on 2008-11-08T05:40:37.000+0000

forgot to add an @group in my second unit test for the issue. Was added in revision 12426

Posted by Ralph Schindler (ralph) on 2008-11-10T11:38:05.000+0000

will need to review this patch, there are hard coded values in tests as well as underscores in test name.

(I will fix this this week, but will keep it assigned to you)

-ralph

Posted by Stefan Koopmanschap (stefan) on 2008-11-10T11:55:03.000+0000

removed hardcoded paths from tests in r12522

Posted by Stefan Koopmanschap (stefan) on 2008-11-10T11:58:15.000+0000

and underscores have been removed from test method names in r12523

Posted by Stefan Koopmanschap (stefan) on 2008-11-10T12:00:17.000+0000

closing issue again, I fixed the raised issues :)

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:09.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts