private function rearrangeHostHeaderKey()
    {
        if (!isset($this->headers['Host'])) {
            return;
        }

        $tmp = $this->headers['Host'];
        $keys = array_keys($this->headers);
        $hostIndex = array_search('Host', $keys, true);

        if (false === $hostIndex) {
            return;
        }

        array_splice($this->headers, $hostIndex, 1);

        $this->headers = ['Host' => $tmp] + $this->headers;
    }