瀏覽代碼

[HttpCache] fixed typo

Fabien Potencier 14 年之前
父節點
當前提交
82686751dd
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

+ 3 - 1
src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

@@ -497,7 +497,9 @@ class HttpCache implements HttpKernelInterface
                 $entry->setContent($new->getContent());
                 $entry->setStatusCode($new->getStatusCode());
                 $entry->setProtocolVersion($new->getProtocolVersion());
-                $entry->setCookies($new->getCookies());
+                foreach ($new->headers->getCookies() as $cookie) {
+                    $entry->headers->setCookie($cookie);
+                }
             } else {
                 // backend is slow as hell, send a 503 response (to avoid the dog pile effect)
                 $entry->setStatusCode(503);