diff --git a/flight/net/Response.php b/flight/net/Response.php index 0276846..5e3a998 100644 --- a/flight/net/Response.php +++ b/flight/net/Response.php @@ -191,7 +191,6 @@ class Response { $this->headers['Expires'] = gmdate('D, d M Y H:i:s', $expires) . ' GMT'; $this->headers['Cache-Control'] = 'max-age='.($expires - time()); } - return $this; } @@ -236,6 +235,11 @@ class Response { } } + // Send content length + if( ($length = strlen($this->body)) > 0) { + header("Content-Length: $length"); + } + return $this; }