app/code/community/Nexcessnet/Turpentine/Model/Observer/Esi.php
public function setFlagHeaders($eventObject) {
        $response = $eventObject->getResponse();
        if (Mage::helper('turpentine/esi')->shouldResponseUseEsi()) {
            $response->setHeader('X-Turpentine-Esi',
                Mage::registry('turpentine_esi_flag') ? '1' : '0');
            Mage::helper('turpentine/debug')->logDebug(
                'Set ESI flag header to: %s',
                (Mage::registry('turpentine_esi_flag') ? '1' : '0') );
        }
    }
public function setFlagHeaders($eventObject) {
        $response = $eventObject->getResponse();
        if (Mage::helper('turpentine/esi')->shouldResponseUseEsi()) {
            $response->setHeader('X-Turpentine-Esi',
                Mage::registry('turpentine_esi_flag') ? '1' : '0');
            Mage::helper('turpentine/debug')->logDebug(
                'Set ESI flag header to: %s',
                (Mage::registry('turpentine_esi_flag') ? '1' : '0') );
        }
    }
public function setFlagHeaders ( $ eventObject ) { $ response = $ eventObject -> getResponse ( ) ; if ( Mage :: helper ( 'turpentine/esi' ) -> shouldResponseUseEsi ( ) ) { $ response -> setHeader ( 'X-Turpentine-Esi' , Mage :: registry ( 'turpentine_esi_flag' ) ? '1' : '0' ) ; Mage :: helper ( 'turpentine/debug' ) -> logDebug ( 'Set ESI flag header to: %s' , ( Mage :: registry ( 'turpentine_esi_flag' ) ? '1' : '0' ) ) ; } }
Check the ESI flag and set the ESI header if needed

Events: http_response_send_before

@param  Varien_Object $eventObject
@return null
Check the ESI flag and set the ESI header if needed