src/Valkyrja/HttpMessage/MessageTrait.php
protected function setHeaders(array $originalHeaders): void
    {
        $headerNames = $headers = [];

        foreach ($originalHeaders as $header => $value) {
            $value = $this->assertHeaderValues($value);

            HeaderSecurity::assertValidName($header);

            $headerNames[strtolower($header)] = $header;
            $headers[$header]                 = $value;
        }

        $this->headerNames = $headerNames;
        $this->headers     = $headers;
    }
protected function setHeaders(array $originalHeaders): void
    {
        $headerNames = $headers = [];

        foreach ($originalHeaders as $header => $value) {
            $value = $this->assertHeaderValues($value);

            HeaderSecurity::assertValidName($header);

            $headerNames[strtolower($header)] = $header;
            $headers[$header]                 = $value;
        }

        $this->headerNames = $headerNames;
        $this->headers     = $headers;
    }
Set headers.

@param array $originalHeaders

@throws \InvalidArgumentException

@return void