Explorar o código

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

Lenar Lõhmus %!s(int64=14) %!d(string=hai) anos
pai
achega
b9a218a5c1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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));
     }
 
     /**