diff --git a/flight/net/Response.php b/flight/net/Response.php index c31f2ee..6a827e5 100644 --- a/flight/net/Response.php +++ b/flight/net/Response.php @@ -29,11 +29,6 @@ class Response { */ protected $body; - /** - * @var bool If a response has already been sent - */ - protected static $sent = false; - /** * @var array HTTP status codes */ @@ -214,25 +209,17 @@ class Response { /** * Sends a HTTP response. - * - * @return object Self reference */ public function send() { if (ob_get_length() > 0) { ob_end_clean(); } - if (!self::$sent) { - if (!headers_sent()) { - $this->sendHeaders(); - } - - echo $this->body; - - self::$sent = true; + if (!headers_sent()) { + $this->sendHeaders(); } - return $this; + exit($this->body); } }