private function parseResponseHeaders($string) {
        $parts = explode("\n", $string);
        foreach ($parts as $part) {
            if (strpos($part, ':') !== false) {
                list($name, $value) = explode(':', $part);
                $this->responseHeaders[trim($name)] = trim($value);
            }
        }
    }