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);
        }
    }