lib/Message/ResponseBuilder.php
public function parseHttpHeaders(array $headers): void
    {
        $headers = $this->filterHeaders($headers);
        $statusLine = array_shift($headers);

        try {
            $this->setStatus($statusLine);
        } catch (InvalidArgumentException $e) {
            array_unshift($headers, $statusLine);
        }

        foreach ($headers as $header) {
            $this->addHeader($header);
        }
    }
public function parseHttpHeaders(array $headers): void
    {
        $headers = $this->filterHeaders($headers);
        $statusLine = array_shift($headers);

        try {
            $this->setStatus($statusLine);
        } catch (InvalidArgumentException $e) {
            array_unshift($headers, $statusLine);
        }

        foreach ($headers as $header) {
            $this->addHeader($header);
        }
    }
Add HTTP headers. The input array is all the header lines from the HTTP message. Optionally including the
status line.