Sends Mime Type Header.
@static
@access		private
@return		void
172610
static private function setMimeType()
	{
		$UserBrowser = '';
		if( preg_match( '@Opera(/| )([0-9].[0-9]{1,2})@', $_SERVER['HTTP_USER_AGENT'] ) )
			$UserBrowser = "Opera";
		elseif( preg_match( '@MSIE ([0-9].[0-9]{1,2})@', $_SERVER['HTTP_USER_AGENT'] ) )
			$UserBrowser = "IE";
		$mime_type = ( $UserBrowser == 'IE' || $UserBrowser == 'Opera' ) ? 'application/octetstream' : 'application/octet-stream';
		header( "Content-Type: ". $mime_type);
	}
780452
public function send()
  {
    // Set headers
    $this->setContentType('application/json');

    /** @var PhrestRequest $request */
    $request = $this->getDI()->get('request');

    // Set content
    if (!$request->isHead())
    {
      if (empty($this->messages))
      {
        $this->messages = null;
      }
      if (empty($this->data))
      {
        $this->data = null;
      }

      if ($request->isPretty())
      {
        $this->setContent(json_encode($this, JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK));
      }
      else
      {
        $this->setContent(json_encode($this, JSON_NUMERIC_CHECK));
      }
    }

    // Send content
    return parent::send();
  }
704656
private function sendHeaders() {
        if (!headers_sent()) {
            http_response_code($this->statusCode);
            foreach ($this->headers as $header) {
                header($header);
            }
            foreach ($this->cookies as $cookie) {
                call_user_func_array("setcookie", $cookie);
            }
        }
    }
308446
public function sendHeaders()
    {
        if (!headers_sent()) {
            foreach ($this->headers as $header) {
                header($header, true);
            }
        }

        $this->headers = array();
        return $this;
    }
204659
function setContentType($mime_type, $charset='utf-8') {
		
		$header = 'Content-Type: ' . $mime_type;
		if ($charset) {
			$header .= '; charset='.$charset;
		}
		
		$this->headers[] = array($header, TRUE);
		
		return $this;
	}
1262042
public function sendHeaders()
    {
        deprecationWarning(
            'Will be removed in 4.0.0'
        );

        $file = $line = null;
        if (headers_sent($file, $line)) {
            Log::warning("Headers already sent in {$file}:{$line}");

            return;
        }

        $codeMessage = $this->_statusCodes[$this->_status];
        $this->_setCookies();
        $this->_sendHeader("{$this->_protocol} {$this->_status} {$codeMessage}");
        $this->_setContentType();

        foreach ($this->headers as $header => $values) {
            foreach ((array)$values as $value) {
                $this->_sendHeader($header, $value);
            }
        }
    }
688075
public function send($send_headers = false)
	{
		$body = $this->__toString();

		if ($send_headers)
		{
			$this->send_headers();
		}

		if ($this->body != null)
		{
			echo $body;
		}
	}
33584
public function send()
    {
        deprecationWarning('Response::send() will be removed in 4.0.0');

        if ($this->hasHeader('Location') && $this->_status === 200) {
            $this->statusCode(302);
        }

        $this->_setContent();
        $this->sendHeaders();

        if ($this->_file) {
            $this->_sendFile($this->_file, $this->_fileRange);
            $this->_file = null;
            $this->_fileRange = [];
        } else {
            $this->_sendContent($this->body());
        }

        if (function_exists('fastcgi_finish_request')) {
            fastcgi_finish_request();
        }
    }
994767
public function sendResult($code, $mime, $message)
    {
        $this->sendHeader('HTTP/1.0 ' . $code);
        $this->sendHeader('Content-Type: ' . $mime);
        $this->sendResponse($message);
    }
840603
function setMimeType( $mime )
    {
        $this->Type = $mime;
        list ( $this->MimeCategory, $this->MimePart ) = explode( '/', $mime, 2 );
    }
1259374
public function send() : bool
    {
        if (headers_sent()) {
            return false;
        }

        header($this->getStartLine());

        foreach ($this->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                header($name . ': ' . $value, false);
            }
        }

        echo (string) $this->body;

        flush();

        return true;
    }
416779
public function sendHeaders(): void
	{
		// Send status header

		$protocol = $this->request->getServer()->get('SERVER_PROTOCOL', 'HTTP/1.1');

		header($protocol . ' ' . $this->statusCode . ' ' . $this->statusCodes[$this->statusCode]);

		// Send content type header

		$contentType = $this->contentType;

		if(stripos($contentType, 'text/') === 0 || in_array($contentType, ['application/json', 'application/xml', 'application/rss+xml', 'application/atom+xml']))
		{
			$contentType .= '; charset=' . $this->charset;
		}

		header('Content-Type: ' . $contentType);

		// Send other headers

		foreach($this->headers->all() as $name => $values)
		{
			foreach($values as $value)
			{
				header($name . ': ' . $value, false);
			}
		}

		// Send cookie headers

		foreach($this->cookies->all() as $cookie)
		{
			['raw' => $raw, 'name' => $name, 'value' => $value, 'options' => $options] = $cookie;

			if($raw)
			{
				setrawcookie($name, $value, $options['expires'], $options['path'], $options['domain'], $options['secure'], $options['httponly']);
			}
			else
			{
				setcookie($name, $value, $options['expires'], $options['path'], $options['domain'], $options['secure'], $options['httponly']);
			}
		}
	}
1124565
public static function Send(){
            $oThis = self::CreateInstanceIfNotExists();
            
            if(is_object($oThis->oSmarty)){
                $oThis->CreateCacheCSS();
                $oThis->CreateCacheJS();
                
                Storage::AssignSmarty($oThis->oSmarty);
                Events::Call("BeforeSendingOutput");
                
                $oThis->oSmarty->display($oThis->sTemplateFilename);
            }
            else{
                $oThis = self::CreateInstanceIfNotExists();
                $oThis->CreateCacheCSS();
                $oThis->CreateCacheJS();
                $oThis->IncludeTemplate();
                $oThis->ReplaceVars();
                $oThis->RemoveUndefinedVars();
                $oThis->CheckConditions();
                //$oThis->ClearList();
                Events::Call("BeforeSendingOutput");

                @header('HTTP/1.1 200 OK');
                @header("Content-Type: text/html; charset=" . strtoupper(Storage::Get("app.charset", "UTF-8")), true);

                try{
                    //var_dump($oThis->sBuffer); die();
                    eval('?> ' . $oThis->sBuffer);
                    die();
                }
                catch(Exception $e){
                    die($e->getMessage());
                }
            }
        }
983061
public function send_http_headers() {
        $this->writer = \Box\Spout\Writer\WriterFactory::create($this->spouttype);
        if (method_exists($this->writer, 'setTempFolder')) {
            $this->writer->setTempFolder(make_request_directory());
        }
        $filename = $this->filename . $this->get_extension();
        $this->writer->openToBrowser($filename);

        // By default one sheet is always created, but we want to rename it when we call start_sheet().
        $this->renamecurrentsheet = true;
    }
784340
public function set_mime_type($mime)
	{
		if (array_key_exists($mime, static::$supported_formats))
		{
			$mime = static::$supported_formats[$mime];
		}

		$this->set_header('Accept', $mime);
		return $this;
	}
423719
public function send()
    {
        http_response_code($this->responseCode);
        foreach ($this->headers as $key => $value) {
            header($key.':'.$value);
        }
        if ($this->getBody() !== '') {
            echo $this->getBody();
        }
    }
686340
public function send()
    {
        if (!$this->isEnable()) {
            return;
        }

        $tags = $this->getTags();
        if (!empty($tags)) {
            \header($this->getHeaderName() . ': ' . \implode(',', $tags));
        }
    }