Set the default header

@return void
976552
public function setDefaultHeader()
    {
        $this->headers[] = "Mime-Version: 1.0";
        $this->headers[] = "Date: " . date("r");
        $this->headers[] = "X-Mailer: PHP/".phpversion();

        if ($this->subject) {
            $this->headers[] = "Subject: " . $this->subject;
        }
    }
902089
public void setDefaultHeaders(Collection<? extends Header> defaultHeaders) {
        Collection<BasicHeader> copiedHeaders = new HashSet<>();
        for (Header header : defaultHeaders) {
            copiedHeaders.add(new BasicHeader(header.getName(), header.getValue()));
        }
        this.defaultHeaders = copiedHeaders;
    }
308798
public function setDefaultHeader(string $name, string $value) {
        $this->defaultHeaders[$name] = $value;
        return $this;
    }
1177066
private function setHeaders($headers) {
        // Make array of the different headers
        $headers = explode(PHP_EOL, $headers);

        foreach ($headers as $header) {
            // Cut the header into pieces
            $header = explode(': ', $header);

            // Skip header if it's not in the default format
            if (!is_array($header) && count($header) === 1) {
                continue;
            }

            // Get the header type
            $type = strtolower(array_shift($header));

            // Glue the header back together
            $value = implode(': ', $header);

            // Skip header if the type or value is empty
            if (empty($type) || empty($value)) {
                continue;
            }

            // Store the header
            $this->headers[$type] = trim($value);
        }
    }
163436
protected function _clearHeader($header)
    {
        $normalized = strtolower($header);
        if (!isset($this->headerNames[$normalized])) {
            return;
        }
        $original = $this->headerNames[$normalized];
        unset($this->headerNames[$normalized], $this->headers[$original]);
    }
24768
private function setToDefault():void
    {
        $this->session = null;
        $this->id = null;
        $this->name = null;
    }
879174
private function setCookiesFromHeaders()
    {
        $this->cookies = [];

        $headers = $this->getHeaderAsArray('Set-Cookie');

        foreach ($headers as $line) {
            $cookie = SetCookie::fromHeader($line);
            $this->cookies[$cookie->getName()] = $cookie;
        }
    }
294908
public function set_header($header, $content = null)
	{
		if (is_null($content))
		{
			$this->headers[] = $header;
		}
		else
		{
			$this->headers[$header] = $content;
		}

		return $this;
	}
1111625
private function _setDefaults()
    {
        if (!isset(self::$_template))
            self::_initializeDefaults();
        foreach (self::$_template as $k=>$v) {
            if ($k[0] != '_')
                $this->$k = $v;
        }
        return $this;
    }
408738
public function setDefaultResponse()
    {
        $error = [[
            'status'    => $this->getStatusCode(),
            'code'      => $this->getCode(),
            'source'    => ['pointer' => $this->getDescription()],
            'title'     => strtolower(class_basename($this->exception)),
            'detail'    => $this->getMessage(),
        ]];

        $this->jsonApiResponse->setStatus($this->getStatusCode());
        $this->jsonApiResponse->setErrors($error);
    }
956323
public function unsetHeader(string $header)
    {
        $header = static::normalizeHeader($header);
        unset($this->headers[$header]);
        return $this;
    }
511840
protected function setRedirectHeaders()
    {
        $this->header->remove('Location');
        $this->header->remove('Refresh');

        if ($this->delay) {
            $this->header->set('Refresh', $this->delay . '; URL=' . $this->address);

            return;
        }

        $this->header->set('Location', $this->address);
    }
197127
public function header($name, $default = NULL) {
    if (isset($this->headers[$name])) {
      return $this->headers[$name];
    }
    return $default;
  }
881325
public function setHeader()
    {
        $args = func_get_args();

        if (is_array($args[0])) {
            foreach ($args[0] as $key => $value)
                $this->headers['headers'][$key] = $value;
        } else {
            $this->headers['headers'][$args[0]] = $args[1];
        }

        return $this;
    }
944321
private static function headers() {
        if (empty(self::$config['httpHeaders'])) {
            return;
        }

        $response = self::$config['httpContext']->getResponse();
        $response->setHeaders(self::$config['httpHeaders']);
    }
650442
public function init()
    {
        $this->header('Content-Type: text/html'); // default header.

        $this->proc = new \PHPDaemon\Core\ShellCommand();
        $this->proc->readPacketSize = $this->appInstance->readPacketSize;
        $this->proc->onReadData([$this, 'onReadData']);
        $this->proc->onWrite([$this, 'onWrite']);
        $this->proc->binPath = $this->appInstance->binPath;
        $this->proc->chroot = $this->appInstance->chroot;

        if (isset($this->attrs->server['BINPATH'])) {
            if (isset($this->appInstance->binAliases[$this->attrs->server['BINPATH']])) {
                $this->proc->binPath = $this->appInstance->binAliases[$this->attrs->server['BINPATH']];
            } elseif ($this->appInstance->config->allowoverridebinpath->value) {
                $this->proc->binPath = $this->attrs->server['BINPATH'];
            }
        }

        if (isset($this->attrs->server['CHROOT']) && $this->appInstance->config->allowoverridechroot->value) {
            $this->proc->chroot = $this->attrs->server['CHROOT'];
        }

        if (isset($this->attrs->server['SETUSER']) && $this->appInstance->config->allowoverrideuser->value) {
            $this->proc->setUser = $this->attrs->server['SETUSER'];
        }

        if (isset($this->attrs->server['SETGROUP']) && $this->appInstance->config->allowoverridegroup->value) {
            $this->proc->setGroup = $this->attrs->server['SETGROUP'];
        }

        if (isset($this->attrs->server['CWD']) && $this->appInstance->config->allowoverridecwd->value) {
            $this->proc->cwd = $this->attrs->server['CWD'];
        } elseif ($this->appInstance->config->cwd->value !== null) {
            $this->proc->cwd = $this->appInstance->config->cwd->value;
        } else {
            $this->proc->cwd = dirname($this->attrs->server['SCRIPT_FILENAME']);
        }

        $this->proc->setArgs([$this->attrs->server['SCRIPT_FILENAME']]);
        $this->proc->setEnv($this->attrs->server);
        $this->proc->execute();
    }
896232
protected function _setDefault()
    {
        if ($this->_default === null) {
            $this->_table->alter(
                sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name))
            );
        } else {
            $this->_table->alter(
                sprintf(
                    'ALTER COLUMN %s SET DEFAULT %s',
                    $this->_database->prepareIdentifier($this->_name),
                    $this->_database->prepareValue($this->_default, $this->_datatype)
                )
            );
        }
    }