public function checkRedirectUrl($eventObject) {
        $esiHelper = Mage::helper('turpentine/esi');
        $url = $eventObject->getTransport()->getUrl();
        $referer = Mage::helper('core/http')->getHttpReferer();
        $dummyUrl = $esiHelper->getDummyUrl();
        $reqUenc = Mage::helper('core')->urlDecode(
            Mage::app()->getRequest()->getParam('uenc') );

        if ($this->_checkIsEsiUrl($url)) {
            if ($this->_checkIsNotEsiUrl($reqUenc) &&
                    Mage::getBaseUrl() == $url) {
                $newUrl = $this->_fixupUencUrl($reqUenc);
            } elseif ($this->_checkIsNotEsiUrl($referer)) {
                $newUrl = $referer;
            } else {
                $newUrl = $dummyUrl;
            }
            // TODO: make sure this actually looks like a URL
            $eventObject->getTransport()->setUrl($newUrl);
        }

        if ($eventObject->getTransport()->getUrl() != $url) {
            Mage::helper('turpentine/debug')->logDebug(
                'Detected redirect to ESI URL, changing: %s => %s',
                $url, $eventObject->getTransport()->getUrl() );
        }
    }