diff --git a/src/Response.php b/src/Response.php index 72a3d6b..8a167fd 100644 --- a/src/Response.php +++ b/src/Response.php @@ -6,6 +6,7 @@ class Response extends \Symfony\Component\HttpFoundation\Response { protected $_callTime; + protected $_headersSent = false; protected $_sendDebugHeaders; /** @@ -58,8 +59,13 @@ public function setCallStartTime($time) */ public function sendHeaders() { - $this->setDebugHeaders(); - return parent::sendHeaders(); + if(!$this->_headersSent) + { + $this->_headersSent = true; + $this->setDebugHeaders(); + return parent::sendHeaders(); + } + return $this; } /**