Send header

@return void
970478
public function _http2_server_push() {
		if ( headers_sent() ) {
			return;
		}

		$do_http2_server_push = apply_filters( 'inc2734_wp_page_speed_optimization_do_http2_server_push', false );
		if ( ! $do_http2_server_push ) {
			return;
		}

		$this->_send_http2_server_push_header( wp_styles(), 'style' );
		$this->_send_http2_server_push_header( wp_scripts(), 'script' );
	}
1212091
public function send(): void
    {
        // status
        if ($this->httpVersion == Http::VERSION_1_0 || $this->httpVersion == Http::VERSION_1_1) {
            header(sprintf('%s %s %s', $this->httpVersion, $this->status->getCode(), $this->status->getText()));
        } elseif ($this->httpVersion == Http::VERSION_2) {
            header(sprintf('%s %s', $this->httpVersion, $this->status->getCode()));
        }

        // load time
        $exposeAppLoadTime = $this->app->configValue('exposeAppLoadTime');
        if ($exposeAppLoadTime === true || $exposeAppLoadTime === $this->app->env()) {
            $this->sendHeader('X-App-Load-Time', $this->app->loadTime());
        }

        [$contentType, $contentCharset, $contentLength] = $this->body->toArray();

        // content type/charset?/length
        if ($this->body->isImage()) {
            $this->sendHeader('Content-Type', $contentType);
        } elseif ($contentType == '') {
            $this->sendHeader('Content-Type', 'n/a');
        } elseif ($contentCharset == '' || in_array($contentType, ['n/a', 'none'])) {
            $this->sendHeader('Content-Type', $contentType);
        } else {
            $this->sendHeader('Content-Type', sprintf('%s; charset=%s', $contentType, $contentCharset));
        }
        $this->sendHeader('Content-Length', (string) $contentLength);

        // print it baby!
        print $this->body->toString();
    }
1169240
public function send()
    {
        if (headers_sent($file, $line)) {
            throw new RuntimeException("Headers already sent in {$file} on line {$line}."); // @codeCoverageIgnore
        }

        foreach ($this->headers() as $key => $value) {
            header("{$key}: {$value}", true);
        }
    }
1119185
protected function sendHeaders()
    {
        $headers = $this->getHeaders();

        foreach ($headers as $header) {
            header($header);
        }
        return $this;
    }
314632
public function sendHeaders()
    {
        foreach ($this->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                header(sprintf('%s: %s', $name, $value), false);
            }
        }

        return $this;
    }
1338857
public function send()
    {
        //wysyłanie nagłówka
        header($this->getName() . ($this->getValue() ? ': ' . $this->getValue() : ''), (bool) $this->getReplace());
    }
129796
public function sendHeaders()
    {
        if (!$this->headersAreSent()) {
            header(
                sprintf(
                    'HTTP/%s %s %s',
                    $this->httpVersion,
                    $this->statusCode,
                    $this->statusText
                ),
                true,
                $this->statusCode
            );

            // Send the headers
            foreach ($this->headers->getAll() as $name => $values) {
                // Headers are allowed to have multiple values
                foreach ($values as $value) {
                    header("$name:$value", false, $this->statusCode);
                }
            }

            // Send the cookies
            /** @var Cookie $cookie */
            foreach ($this->headers->getCookies(true) as $cookie) {
                setcookie(
                    $cookie->getName(),
                    $cookie->getValue(),
                    $cookie->getExpiration(),
                    $cookie->getPath(),
                    $cookie->getDomain(),
                    $cookie->isSecure(),
                    $cookie->isHttpOnly()
                );
            }
        }
    }
994434
public function send()
    {
        if ( ! headers_sent()) {
            $this->sendHeaders();
        }
        http_response_code($this->status);
        echo $this->prepareContent($this->content);
    }
864931
public function send()
    {
        if (!$this->_error) {
            foreach ($this->_headers as $value) {
                header($value);
            }//end foreach
            header('N5_RAND_TOKEN: '.$GLOBALS['app']->getSessionManager()->getActiveSession()->getAttribute('nonce'));
            echo $this->_transform($this->_encoding, $this->_body);
        }
    }
435096
public function sendHeader()
    {
        $file = $line = null;
        if ($this->isHeaderSent($file, $line)) {
            if ($this->wei->has('logger')) {
                $this->logger->debug(sprintf('Header has been at %s:%s', $file, $line));
            }
            return false;
        }

        // Send status
        $this->sendRawHeader(sprintf('HTTP/%s %d %s', $this->version, $this->statusCode, $this->statusText));

        // Send headers
        foreach ($this->headers as $name => $values) {
            foreach ($values as $value) {
                $this->sendRawHeader($name . ': ' . $value);
            }
        }

        $this->sendCookie();

        return true;
    }
241210
public function sendHeaders()
    {
        // Throw exception if header already sent
        if ($this->headersSent()) {
            throw new ResponseException('Cannot send headers, headers already sent.');
        }

        /*
         | If headers not set already we will set header here
         */
        if (!$this->headers->has('Content-Type')) {
            $this->setHeader('Content-Type', $this->getContentType().'; charset='.$this->getCharset());
        }

        // Check if script is running in FCGI server
        if ($this->server('FCGI_SERVER_VERSION')) {
            //We will set Header for Fast-CGI server
            $this->setFastCgiHeader();
        } else {
            $this->setHeaderForServer();
        }

        foreach ($this->headers->all() as $name => $values) {
            foreach ($values as $value) {
                // Create the header and send it
                is_string($name) && $value = "{$name}: {$value}";
                header($value, true);
            }
        }

        return $this;
    }
674172
public function sendHeaders()
    {
        foreach ($this->_headers as $key => $value) {
            if (is_array($value)) {
                foreach ($value as $v) {
                    header($key.': '.$v, false);
                }
            } else {
                header($key.': '.$value);
            }
        }

        return $this;
    }
289801
function send()
    {
        if (!headers_sent()) {
            extract($this->toArray());
            setcookie($name, $value, $expires, $path, $domain, $secure, $httponly);
        }
    }
996807
protected function sendHttpHeaders(): void
    {
        // grab content disposition
        $disposition = $this->opt->getContentDisposition();

        if ($this->output_name) {
            // Various different browsers dislike various characters here. Strip them all for safety.
            $safe_output = trim(str_replace(['"', "'", '\\', ';', "\n", "\r"], '', $this->output_name));

            // Check if we need to UTF-8 encode the filename
            $urlencoded = rawurlencode($safe_output);
            $disposition .= "; filename*=UTF-8''{$urlencoded}";
        }

        $headers = array(
            'Content-Type' => $this->opt->getContentType(),
            'Content-Disposition' => $disposition,
            'Pragma' => 'public',
            'Cache-Control' => 'public, must-revalidate',
            'Content-Transfer-Encoding' => 'binary'
        );

        $call = $this->opt->getHttpHeaderCallback();
        foreach ($headers as $key => $val) {
            $call("$key: $val");
        }
    }
750406
protected function sendHeader()
    {
        /* @var $response Doozr_Response_Web */
        $response = $this->front->getResponse();

        // Custom default header configured?
        try {
            $headers = object_to_array(
                $this->configuration->kernel->transmission->response->header->api->rest
            );

        } catch (Exception $e) {
            $headers = [];
        }

        // add our REST API Header set ... $headers
        $headers = $this->normalizeHeaders(
            merge_array($this->getDefaultApiResponseHeader(), $headers)
        );

        // Send configured header
        foreach ($headers as $header) {
            $response->sendHeader($header);
        }
    }
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);
            }
        }
    }
500786
public function send()
    {
        foreach ($this->headers as $header) {
            header($header->getString(), $header->getReplace(), $header->getHttpResponseCode());
        }
    }