mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-24 01:53:58 +01:00
Merge pull request #1232 from spyric/bad_cookie
Fix incorrect equal sign in cookie value
This commit is contained in:
commit
33af93ab4b
@ -69,7 +69,7 @@ class CookieJar implements CookieJarInterface
|
||||
{
|
||||
if (substr($value, 0, 1) !== '"' &&
|
||||
substr($value, -1, 1) !== '"' &&
|
||||
strpbrk($value, ';,')
|
||||
strpbrk($value, ';,=')
|
||||
) {
|
||||
$value = '"' . $value . '"';
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ class CookieJarTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
$this->assertEquals('foo', CookieJar::getCookieValue('foo'));
|
||||
$this->assertEquals('"foo,bar"', CookieJar::getCookieValue('foo,bar'));
|
||||
$this->assertEquals('"foobar="', CookieJar::getCookieValue('foobar='));
|
||||
$this->assertEquals('"foo;bar"', CookieJar::getCookieValue('foo;bar'));
|
||||
}
|
||||
|
||||
public function testCreatesFromArray()
|
||||
|
Loading…
x
Reference in New Issue
Block a user