Send all headers at once
13085
public function sendAllHeaders()
    {
        if ($this->status_header !== null) {
            header($this->status_header);
        }

        foreach ($this->headers as $name => $value) {
            header($name . ': ' . $value);
        }
    }
1226551
protected function sendHttpHeaders(iterable $headers):void
    {
        foreach ($headers as $header => $value) {
            header("$header: $value", false);
        }
    }
954445
async def write_headers(self, status_line: str,
                            headers: 'CIMultiDict[str]') -> None:
        """"""
        # status + headers
        buf = _serialize_headers(status_line, headers)
        self._write(buf)
308446
public function sendHeaders()
    {
        if (!headers_sent()) {
            foreach ($this->headers as $header) {
                header($header, true);
            }
        }

        $this->headers = array();
        return $this;
    }
116306
def send_headers(self):
        
        self.events.sync_emit('headers')
        self._set_default_headers()
        header_str = self.status_line + self.EOL + str(self.headers)
        self.stream.write(header_str.encode())
        self.events.sync_emit('after_headers')
1080301
def end_headers(self):
        
        # Send them all at once
        for name, value in self._headers.items():
            self._handler.send_header(name, value)

        self._handler.end_headers()
1100846
public function sendHeaders()
    {
        if (empty($this->headers)) {
            return;
        }

        $this->checkIfHeadersAlreadySent();

        foreach ($this->headers as $header) {
            switch ($header) {
                case '403':
                    header('HTTP/1.0 403 Forbidden');
                    break;

                case '404':
                    header('HTTP/1.0 404 Not Found');
                    break;

                case '500':
                    header('HTTP/1.0 500 Internal Server Error');
                    break;

                default:
                    throw new \Exception("Trying to sen unkown header type: '$header'.");
            }
        }

        return $this;
    }
935210
async def _send(self, request_bytes, body_bytes, h11_connection):
        '''
        
        '''
        await self.sock.send_all(h11_connection.send(request_bytes))
        if body_bytes is not None:
            await self.sock.send_all(h11_connection.send(body_bytes))
        await self.sock.send_all(h11_connection.send(h11.EndOfMessage()))
1185613
public function sendHeaders()
	{
		if (!$this->checkHeadersSent())
		{
			foreach ($this->response->headers as $header)
			{
				if (strtolower($header['name']) == 'status')
				{
					// 'status' headers indicate an HTTP status, and need to be handled slightly differently
					$status = $this->getHttpStatusValue($header['value']);

					$this->header($status, true, (int) $header['value']);
				}
				else
				{
					$this->header($header['name'] . ': ' . $header['value']);
				}
			}
		}

		return $this;
	}
1342141
def send_getheaders( self, prev_block_hash ):
        

        getheaders = GetHeaders()

        getheaders.add_block_hash( prev_block_hash )

        log.debug("send getheaders")
        self.send_message( getheaders )
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);
            }
        }
    }
434828
def send(self, *args):
        
        for frame in args:
            self.sock.sendall(self.apply_send_hooks(frame, False).pack())
314632
public function sendHeaders()
    {
        foreach ($this->getHeaders() as $name => $values) {
            foreach ($values as $value) {
                header(sprintf('%s: %s', $name, $value), false);
            }
        }

        return $this;
    }
579335
public function send()
    {
        header(
            sprintf(
                'HTTP/1.1 %s %s',
                $this->statusCode,
                self::codeToReason($this->statusCode)
            )
        );
        foreach ($this->headers as $k => $v) {
            header(
                sprintf('%s: %s', $k, $v)
            );
        }
        echo $this->body;
    }
974707
def sendall(self, data, flags=0):
        ''''''
        count = len(data)
        while count:
            sent = self.send(data, flags)
            # This could probably be a buffer object
            data = data[sent:]
            count -= sent
7603
def on_headers(self, response, exc=None):
        ''''''

        if response.status_code == 101:
            connection = response.connection
            request = response.request
            handler = request.websocket_handler
            if not handler:
                handler = WS()
            parser = request.client.frame_parser(kind=1)
            consumer = partial(WebSocketClient.create,
                               response, handler, parser)
            connection.upgrade(consumer)
            response.event('post_request').fire()
            websocket = connection.current_consumer()
            response.request_again = lambda r: websocket
991549
def sendall(self, *args, **kwargs):
        """"""
        return self._safe_call(
            False,
            super(SSLFileobjectMixin, self).sendall,
            *args, **kwargs
        )