浏览代码

[HttpFoundation] set Content-Length header to the length of content

Lenar Lõhmus 14 年之前
父节点
当前提交
b9a218a5c1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/Symfony/Component/HttpFoundation/Response.php

+ 1 - 0
src/Symfony/Component/HttpFoundation/Response.php

@@ -172,6 +172,7 @@ class Response
         }
 
         $this->content = (string) $content;
+        $this->headers->set('Content-Length', strlen($this->content));
     }
 
     /**