public function get($name)
    {
        if (strtolower($name) === 'cache-control') {
            return $this->getCacheControlHeader();
        }

        if (strtolower($name) === 'set-cookie') {
            $cookies = $this->fields['Set-Cookie'] ?? [];
            foreach ($this->cookies as $cookie) {
                $cookies[] = (string)$cookie;
            }

            return $cookies;
        }

        if (!isset($this->fields[$name])) {
            return null;
        }

        $convertedValues = [];
        foreach ($this->fields[$name] as $index => $value) {
            $convertedValues[$index] = \DateTime::createFromFormat(DATE_RFC2822, $value);
            if ($convertedValues[$index] === false) {
                $convertedValues[$index] = $value;
            }
        }

        return (count($convertedValues) > 1) ? $convertedValues : reset($convertedValues);
    }