Skip to content

Commit

Permalink
Setting cookies in a single line. Fixes #48
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Jun 23, 2010
1 parent 6fa4ce5 commit 637ab82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cake/libs/http_socket.php
Expand Up @@ -890,7 +890,7 @@ function buildCookies($cookies) {
foreach ($cookies as $name => $cookie) {
$header[] = $name.'='.$this->escapeToken($cookie['value'], array(';'));
}
$header = $this->buildHeader(array('Cookie' => $header), 'pragmatic');
$header = $this->buildHeader(array('Cookie' => implode('; ', $header)), 'pragmatic');
return $header;
}
/**
Expand Down
2 changes: 1 addition & 1 deletion cake/tests/cases/libs/http_socket.test.php
Expand Up @@ -1228,7 +1228,7 @@ function testBuildCookies() {
'path' => '/accounts'
)
);
$expect = "Cookie: foo=bar\r\nCookie: people=jim,jack,johnny\";\"\r\n";
$expect = "Cookie: foo=bar; people=jim,jack,johnny\";\"\r\n";
$result = $this->Socket->buildCookies($cookies);
$this->assertEqual($result, $expect);
}
Expand Down

0 comments on commit 637ab82

Please sign in to comment.