public function setHeader($header, $value)
    {
        $value = !is_array($value) ? array($value) : array_map('trim', $value);

        $name = strtolower($header);

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

        foreach(array_keys($this->headerLines) as $key)
            if(strtolower($key) == $name)
                unset($this->headerLines[$key]);

        $this->headerLines[$header] = $value;

        return $this;
    }