protected function parseIncomingCookies($headers)
    {
        $this->incomingTrackerCookies = array();
        
        if (!empty($headers)) {
            $headerName = 'set-cookie:';
            $headerNameLength = strlen($headerName);
            
            foreach($headers as $header) {
                if (strpos(strtolower($header), $headerName) !== 0) {
                    continue;
                }
                $cookies = trim(substr($header, $headerNameLength));
                $posEnd = strpos($cookies, ';');
                if ($posEnd !== false) {
                    $cookies = substr($cookies, 0, $posEnd);
                }
                parse_str($cookies, $this->incomingTrackerCookies);
            }
        }   
    }