public function setHeader($name, $value)
    {
        if (!self::isValidHeader($name, $value)) {
            return false;
        }

        if (isset($this->requiredHttpHeaders[$name])) {
            return $this->requiredHttpHeaders[$name] === $value;
        }

        $this->headers[$name] = $value;

        return true;
    }