Zend Framework

setCookie() concats the the new cookie to the previous header cookie string

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 1.7.0
  • Component/s: Zend_Http_Client
  • Labels:
    None

Description

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

Reproduction code:

<?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; "

Activity

Hide
Stefan Koopmanschap added a comment -

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

Show
Stefan Koopmanschap added a comment - Fixed in revision 12425. Added a check if cookie seperator is present in the string, if not, add it.
Hide
Stefan Koopmanschap added a comment -

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

Show
Stefan Koopmanschap added a comment - forgot to add an @group in my second unit test for the issue. Was added in revision 12426
Hide
Ralph Schindler added a comment -

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

Show
Ralph Schindler added a comment - 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
Hide
Stefan Koopmanschap added a comment -

removed hardcoded paths from tests in r12522

Show
Stefan Koopmanschap added a comment - removed hardcoded paths from tests in r12522
Hide
Stefan Koopmanschap added a comment -

and underscores have been removed from test method names in r12523

Show
Stefan Koopmanschap added a comment - and underscores have been removed from test method names in r12523
Hide
Stefan Koopmanschap added a comment -

closing issue again, I fixed the raised issues

Show
Stefan Koopmanschap added a comment - closing issue again, I fixed the raised issues
Hide
Wil Sinclair added a comment -

Changing issues in preparation for the 1.7.0 release.

Show
Wil Sinclair added a comment - Changing issues in preparation for the 1.7.0 release.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: