Pārlūkot izejas kodu

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

Lenar Lõhmus 14 gadi atpakaļ
vecāks
revīzija
b9a218a5c1
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  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));
     }
 
     /**