浏览代码

[HttpKernel] fixed content-type management for ESIs when charset is part of the response content-type header

Fabien Potencier 15 年之前
父节点
当前提交
1caabe1123
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/Symfony/Components/HttpKernel/Cache/Esi.php

+ 2 - 1
src/Symfony/Components/HttpKernel/Cache/Esi.php

@@ -139,7 +139,8 @@ class Esi
             $type = 'text/html';
         }
 
-        if (!in_array($type, $this->contentTypes)) {
+        $parts = implode(';', $type);
+        if (!in_array($parts[0], $this->contentTypes)) {
             return $response;
         }