public function setHeader($name, $value, $replace = true)
    {
        $lowercaseName = strtolower($name);
        if ($replace || !isset($this->headers[$lowercaseName])) {
            $this->headers[$lowercaseName] = array($name, array($value));
        } else {
            $this->headers[$lowercaseName][1][] .= $value;
        }

        $this->messageCache = null;
    }