Sends all headers of stack
500786
public function send()
    {
        foreach ($this->headers as $header) {
            header($header->getString(), $header->getReplace(), $header->getHttpResponseCode());
        }
    }
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");
        }
    }
1226551
protected function sendHttpHeaders(iterable $headers):void
    {
        foreach ($headers as $header => $value) {
            header("$header: $value", false);
        }
    }
336295
public void send(OutputStream os, 
                   HeadersAmp headers,
                   String address, 
                   String methodName,
                   PodRef podCaller,
                   Object []args)
    throws IOException
  {
    init(os);

    OutH3 out = _out;

    if (out == null) {
      return;
    }
    
    if (log.isLoggable(Level.FINEST)) {
      log.finest("hamp-send-w " + methodName + Arrays.asList(args)
                + "\n  {to:" + address + "}");
    }
  
    try {
      out.writeLong(MessageTypeHamp.SEND.ordinal());
      writeHeaders(out, headers);
    
      writeMethod(out, address, methodName, podCaller);
      writeArgs(out, args);

      // XXX: out.flushBuffer();
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
      
      throw e;
    }
  }
402127
def _send_packet(self, packet):
        """"""
        encoded = json.dumps(packet)
        self.ws.send(encoded)
414067
public function send(): void
	{
		if($this->body instanceof ResponseSenderInterface)
		{
			// This is a response sender so we'll just pass it the
			// request and response instances and let it handle the rest itself

			$this->body->send($this->request, $this);
		}
		else
		{
			if($this->body instanceof ResponseBuilderInterface)
			{
				$this->body->build($this->request, $this);
			}

			$sendBody = true;

			// Make sure that output buffering is enabled

			if(ob_get_level() === 0)
			{
				ob_start();
			}

			// Cast body to string in case it's an obect implementing __toString

			$this->body = (string) $this->body;

			// Check ETag if response cache is enabled

			if($this->responseCache === true)
			{
				$hash = '"' . hash('sha256', $this->body) . '"';

				$this->headers->add('ETag', $hash);

				if(str_replace('-gzip', '', $this->request->getHeaders()->get('If-None-Match')) === $hash)
				{
					$this->setStatus(304);

					$sendBody = false;
				}
			}

			if($sendBody && !in_array($this->statusCode, [100, 101, 102, 204, 304]))
			{
				// Start compressed output buffering if output compression is enabled

				if($this->outputCompression)
				{
					ob_start('ob_gzhandler');
				}

				echo $this->body;

				// If output compression is enabled then we'll have to flush the compressed buffer
				// so that we can get the compressed content length when setting the content-length header

				if($this->outputCompression)
				{
					ob_end_flush();
				}

				// Add the content-length header

				if(!$this->headers->has('Transfer-Encoding'))
				{
					$this->headers->add('Content-Length', ob_get_length());
				}
			}

			// Send the headers and flush the output buffer

			$this->sendHeaders();

			ob_end_flush();
		}
	}
910415
def append_headers(f):
    
    @wraps(f)
    def _response_decorator(*args, **kwargs):
        r = f(*args, **kwargs)
        response = r if isinstance(r, Response) else make_response(r)
        append_all(response)
        return response

    return _response_decorator
1126576
def _dump_header(self):
        """"""
        with open(self._file, 'w') as _file:
            _file.write(self._hsrt)
            self._sptr = _file.tell()
            _file.write(self._hend)
1249500
def list_all(custom_headers:nil)
      response = list_all_async(custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
401218
public function send()
    {
        foreach ($this->headers as $key => $value) {
            header("$key: " . implode(',', $value));
        }

        if($this->hasHeader('Content-Type') === false) {
            header(vsprintf(
                'Content-Type: %s',
                $this->hasHeader('Content-Type') ? $this->getHeader('Content-Type') : [$this->contentType]
            ));
        }

        http_response_code($this->getStatusCode());

        if ($this->stream !== null) {
            if ($this->compression) {
                ob_start('ob_gzhandler');
            }
            echo (string)$this->getBody();
        }

        ob_end_flush();
    }
1241922
public static function sendHeaders()
    {
        if (! headers_sent()) {
            foreach (self::$headers as $header) {
                header($header, true);
            }

            return true;
        }

        return false;
    }
873457
public void send(HeadersAmp headers,
                   String to, 
                   String methodName,
                   Object ...args)
    throws IOException
  {
    if (log.isLoggable(Level.FINEST)) {
      log.finest(this + " send " + methodName + Arrays.asList(args)
                + "\n  {to:" + to + "," + headers + "}");
    }
    
    try {
      JsonWriterImpl jOut = _jOut;

      jOut.init();

      jOut.writeStartArray();
      jOut.write("send");

      writeHeaders(jOut, headers);

      jOut.write(to);
      jOut.write(methodName);

      writeArgs(jOut, args);

      jOut.writeEndArray();

      jOut.close();
    } catch (Throwable e) {
      log.log(Level.WARNING, e.toString(), e);
      
      throw e;
    }
  }
1203680
def end_headers(self):
        """"""
        if self.request_version != 'HTTP/0.9':
            self._headers_buffer.append(b"\r\n")
            self.flush_headers()
527393
def send(self, url, data, headers):
        
        eventlet.spawn(self._send_payload, (url, data, headers))
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()
                );
            }
        }
    }
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
991549
def sendall(self, *args, **kwargs):
        """"""
        return self._safe_call(
            False,
            super(SSLFileobjectMixin, self).sendall,
            *args, **kwargs
        )