瀏覽代碼

[HttpKernel] removed unnecessary regex

The pattern was also flawed because of the unescaped `.`
Kris Wallsmith 13 年之前
父節點
當前提交
7f7f82a53e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/HttpKernel/HttpCache/Esi.php

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

@@ -64,7 +64,7 @@ class Esi
             return false;
         }
 
-        return (Boolean) preg_match('#ESI/1.0#', $value);
+        return false !== strpos($value, 'ESI/1.0');
     }
 
     /**