public function Send () {
		if ($this->IsSent()) return;
		$httpVersion = $this->GetHttpVersion();
		$code = $this->GetCode();
		$status = $this->codeMessage !== NULL
			? ' '.$this->codeMessage
			: (isset(static::$codeMessages[$code]) 
				? ' '.static::$codeMessages[$code] 
				: '');
		if (!isset($this->headers['Content-Encoding'])) {
			if (!$this->encoding) $this->encoding = 'utf-8';
			$this->headers['Content-Encoding'] = $this->encoding;
		}
		$this->UpdateHeaders();
		header($httpVersion . ' ' . $code . $status);
		header('Host: ' . $this->request->GetHost());
		foreach ($this->headers as $name => $value) {
			if ($name == 'Content-Type') {
				$charsetMatched = FALSE;
				$charsetPos = strpos($value, 'charset');
				if ($charsetPos !== FALSE) {
					$equalPos = strpos($value, '=', $charsetPos);
					if ($equalPos !== FALSE) $charsetMatched = TRUE;
				}
				if (!$charsetMatched) $value .= ';charset=' . $this->encoding;
			}
			if (isset($this->disabledHeaders[$name])) {
				header_remove($name);
			} else {
				header($name . ": " . $value);
			}
		}
		foreach ($this->disabledHeaders as $name => $b)
			header_remove($name);
		$this->addTimeAndMemoryHeader();
		echo $this->body;
		if (ob_get_level()) echo ob_get_clean();
		flush();
		$this->sent = TRUE;
	}
public function Send () {
		if ($this->IsSent()) return;
		$httpVersion = $this->GetHttpVersion();
		$code = $this->GetCode();
		$status = $this->codeMessage !== NULL
			? ' '.$this->codeMessage
			: (isset(static::$codeMessages[$code]) 
				? ' '.static::$codeMessages[$code] 
				: '');
		if (!isset($this->headers['Content-Encoding'])) {
			if (!$this->encoding) $this->encoding = 'utf-8';
			$this->headers['Content-Encoding'] = $this->encoding;
		}
		$this->UpdateHeaders();
		header($httpVersion . ' ' . $code . $status);
		header('Host: ' . $this->request->GetHost());
		foreach ($this->headers as $name => $value) {
			if ($name == 'Content-Type') {
				$charsetMatched = FALSE;
				$charsetPos = strpos($value, 'charset');
				if ($charsetPos !== FALSE) {
					$equalPos = strpos($value, '=', $charsetPos);
					if ($equalPos !== FALSE) $charsetMatched = TRUE;
				}
				if (!$charsetMatched) $value .= ';charset=' . $this->encoding;
			}
			if (isset($this->disabledHeaders[$name])) {
				header_remove($name);
			} else {
				header($name . ": " . $value);
			}
		}
		foreach ($this->disabledHeaders as $name => $b)
			header_remove($name);
		$this->addTimeAndMemoryHeader();
		echo $this->body;
		if (ob_get_level()) echo ob_get_clean();
		flush();
		$this->sent = TRUE;
	}
public function Send ( ) { if ( $ this -> IsSent ( ) ) return ; $ httpVersion = $ this -> GetHttpVersion ( ) ; $ code = $ this -> GetCode ( ) ; $ status = $ this -> codeMessage !== NULL ? ' ' . $ this -> codeMessage : ( isset ( static :: $ codeMessages [ $ code ] ) ? ' ' . static :: $ codeMessages [ $ code ] : '' ) ; if ( ! isset ( $ this -> headers [ 'Content-Encoding' ] ) ) { if ( ! $ this -> encoding ) $ this -> encoding = 'utf-8' ; $ this -> headers [ 'Content-Encoding' ] = $ this -> encoding ; } $ this -> UpdateHeaders ( ) ; header ( $ httpVersion . ' ' . $ code . $ status ) ; header ( 'Host: ' . $ this -> request -> GetHost ( ) ) ; foreach ( $ this -> headers as $ name => $ value ) { if ( $ name == 'Content-Type' ) { $ charsetMatched = FALSE ; $ charsetPos = strpos ( $ value , 'charset' ) ; if ( $ charsetPos !== FALSE ) { $ equalPos = strpos ( $ value , '=' , $ charsetPos ) ; if ( $ equalPos !== FALSE ) $ charsetMatched = TRUE ; } if ( ! $ charsetMatched ) $ value .= ';charset=' . $ this -> encoding ; } if ( isset ( $ this -> disabledHeaders [ $ name ] ) ) { header_remove ( $ name ) ; } else { header ( $ name . ": " . $ value ) ; } } foreach ( $ this -> disabledHeaders as $ name => $ b ) header_remove ( $ name ) ; $ this -> addTimeAndMemoryHeader ( ) ; echo $ this -> body ; if ( ob_get_level ( ) ) echo ob_get_clean ( ) ; flush ( ) ; $ this -> sent = TRUE ; }
Send all HTTP headers and send response body.
@return void
Send all HTTP headers and send response body .