We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Does CGI WebSite invoke OnSendResponse in ISAP ExtensionRSS

2 replies

Last post Aug 27, 2009 03:57 AM by gary_huang_123

  • Does CGI WebSite invoke OnSendResponse in ISAP Extension

    Aug 26, 2009 06:31 AM|gary_huang_123|LINK

    i traced the debug information,the cgi application just invoked OnPreprocHeaders  , OnUrlMap   OnSendRawData ..,but didn't invoke OnSendResponse.why?

     the flags are set as:

     if (pVer->dwServerFilterVersion >= dwVersion)
        {
            pVer->dwFlags |= SF_NOTIFY_SECURE_PORT
           | SF_NOTIFY_PREPROC_HEADERS
           | SF_NOTIFY_SEND_RESPONSE
           | SF_NOTIFY_SEND_RAW_DATA
           | SF_NOTIFY_NONSECURE_PORT
           | SF_NOTIFY_END_OF_REQUEST
           | SF_NOTIFY_URL_MAP;
        }
        else
        {
            pVer->dwFlags |= SF_NOTIFY_SECURE_PORT
           | SF_NOTIFY_PREPROC_HEADERS
           | SF_NOTIFY_SEND_RESPONSE
           | SF_NOTIFY_SEND_RAW_DATA
           | SF_NOTIFY_NONSECURE_PORT
           | SF_NOTIFY_END_OF_REQUEST
           | SF_NOTIFY_URL_MAP
           | SF_NOTIFY_READ_RAW_DATA;
        }

     

    now i want to set cookies on client machine,but cgi doesn't invoke OnSendResponse(OnSendReponse construct  cookies) ,what should i do?

    IIS6.0 ISAPI Filter

  • Re: Does CGI WebSite invoke OnSendResponse in ISAP Extension

    Aug 26, 2009 01:22 PM|anilr|LINK

    Is the CGI you are using have a nph- prefix?  The nph stands for "non parsed header" and so the data provided by the CGI is sent as/is without being interpreted as headers/entity and hence no SEND_RESPONSE event fired.

    Anil Ruia
    Software Design Engineer
    IIS Core Server
  • Re: Does CGI WebSite invoke OnSendResponse in ISAP Extension

    Aug 27, 2009 03:57 AM|gary_huang_123|LINK

    my CGI doesn't have nph- prefix.OnPreprocHeaders can be fired ,but OnSendResponse can't.

     i can see some "Set-Cookies:..." in OnSendRawData function. What i wanna do is to add my own informaiton in "Set-Cookies" items. Then i can have some operations according to the information of the cookies which i set before.