public function canSendHeaders($throw = false)
        {
            $ok = headers_sent($file, $line);

            if ($ok && $throw && $this->headersSentThrowsException) {
                throw new Exception('Cannot send headers; headers already sent in ' . $file . ', line ' . $line);
            }

            return !$ok;
        }