src/Http/RequestFactory.php
private function addHeaderValue(HttpHeaders $headers, string $name, $value, bool $append): void
    {
        $decodedValue = trim((string)(isset(self::$headersToUrlDecode[$name]) ? urldecode($value) : $value));

        if (isset(self::$specialCaseHeaders[$name])) {
            $headers->add($name, $decodedValue, $append);
        } elseif (strpos($name, 'HTTP_') === 0) {
            // Drop the "HTTP_"
            $normalizedName = substr($name, 5);
            $headers->add($normalizedName, $decodedValue, $append);
        }
    }
private function addHeaderValue(HttpHeaders $headers, string $name, $value, bool $append): void
    {
        $decodedValue = trim((string)(isset(self::$headersToUrlDecode[$name]) ? urldecode($value) : $value));

        if (isset(self::$specialCaseHeaders[$name])) {
            $headers->add($name, $decodedValue, $append);
        } elseif (strpos($name, 'HTTP_') === 0) {
            // Drop the "HTTP_"
            $normalizedName = substr($name, 5);
            $headers->add($normalizedName, $decodedValue, $append);
        }
    }
Adds a header value

@param HttpHeaders $headers The headers to add to
@param string $name The name of the header
@param mixed $value The header value to add
@param bool $append Whether or not to append the value