locked
ISAPI Filter working great but.... sometimes PREPROC_HEADERS not sending header nor cookies? RRS feed

  • Question

  • User955180140 posted

    I am working on a filter using SF_NOTIFY_PREPROC_HEADERS

    I am modifying cookies, etc...

    For debugging I am simply dumping headers to a log file (for now).

    What's strange is that I can see in fiddler that a POST request to an url has headers and cookies, etc.

    But when I print out the headers in the PREPROC_HEADERS event ... it doesn't show anything.

    Here's the general code  in the preproc header event

    ....

    buf[MAX_PATH*2]="";   // big enough 

    pfc->GetServerVariable( pfc, "ALL_RAW", buf, &size );

    log.out(buf );

    .....

    Now many pages show the full header with cookies, etc...

    However pages that have POST request are not showing any headers!

    Moreover, I am specifcally interested in the cookies, so I can do a 

    pfc->GetHeader( pfc, "Cookie:", buf, &size );

    and am successful...most of the time, and here's the real problem I am having, no cookies are found!

    I have code to account for buffer size being too small, etc.

    It is extremely strange...seems like cookies/header are missing! (but only in some cases and it appears to be when a POST request occurs but that could just be coincidental)

    Friday, May 23, 2014 11:21 AM

Answers