Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '2.1' into 2.2

* 2.1:
  sub-requests are now created with the same class as their parent
  [FrameworkBundle] removed BC break
  [FrameworkBundle] changed temp kernel name in cache:clear
  [DoctrineBridge] Avoids blob values to be logged by doctrine
  [Security] use current request attributes to generate redirect url?
  [Validator] fix showing wrong max file size for upload errors
  [TwigBridge] removed double var initialization (refs #7344)
  [2.1][TwigBridge] Fixes Issue #7342 in TwigBridge
  [FrameworkBundle] fixed cahe:clear command's warmup
  [TwigBridge] now enter/leave scope on Twig_Node_Module
  [TwigBridge] fixed fixed scope & trans_default_domain node visitor
  [TwigBridge] fixed non probant tests & added new one
  [BrowserKit] added ability to ignored malformed set-cookie header
  [Translation] removed wriong 'use'
  [Translation] added xliff loader/dumper with resname support
  [TwigBridge] fixes

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/HttpKernel.php
	src/Symfony/Component/Security/Http/HttpUtils.php
	src/Symfony/Component/Translation/Loader/XliffFileLoader.php
	src/Symfony/Component/Translation/Tests/Loader/XliffFileLoaderTest.php
  • Loading branch information...
commit d55e7ffd7f10bead48adb03b208bc67bd53926bb 2 parents 0c21012 + f3a6dff
@fabpot fabpot authored
Showing with 12 additions and 1 deletion.
  1. +5 −1 CookieJar.php
  2. +7 −0 Tests/CookieJarTest.php
View
6 CookieJar.php
@@ -109,7 +109,11 @@ public function updateFromSetCookie(array $setCookies, $uri = null)
}
foreach ($cookies as $cookie) {
- $this->set(Cookie::fromString($cookie, $uri));
+ try {
+ $this->set(Cookie::fromString($cookie, $uri));
+ } catch (\InvalidArgumentException $e) {
+ // invalid cookies are just ignored
+ }
}
}
View
7 Tests/CookieJarTest.php
@@ -82,6 +82,13 @@ public function testUpdateFromSetCookie()
$this->assertEquals('bar', $cookieJar->get('bar')->getValue(), '->updateFromSetCookie() keeps existing cookies');
}
+ public function testUpdateFromEmptySetCookie()
+ {
+ $cookieJar = new CookieJar();
+ $cookieJar->updateFromSetCookie(array(''));
+ $this->assertEquals(array(), $cookieJar->all());
+ }
+
public function testUpdateFromSetCookieWithMultipleCookies()
{
$timestamp = time() + 3600;
Please sign in to comment.
Something went wrong with that request. Please try again.