Hi everyone, I wrote a ISAPI filter DLL to process text/html content. Whenever there's a request for a .php file, the OnUrlMap gets called 3 times whereas .html or ..asp files causes the right behaviour in Filter (i.e. - OnUrlMap gets called once only). How do I get rid off this problem? Below is the excerpt of the code - DWORD OnSendRawData(...) { //Process pvRawData.... ........ //Writes HTTP HEADER to client pfc->WriteClient(....); //Writes BODY //pfc->WriteClient(...); } When the code executes for HTTP HEADER, the function gets suspended and the second request of the .php file calls OnSendRawData. When any Win32 API gets called in the OnSendRawData code, the second request is suspended and the first one is resumed (i.e.- starts writing the BODY). As both are same actually request, it messed up the private (or content specific) data. So, How to stop multiple request in OnUrlMap?
The behaviors you describe are all by-design. http://blogs.msdn.com/david.wang/archive/2006/03/11/Why_some_ISAPI_Filter_events_trigger_multiple_times_per_request.aspx -- //David IIS http://blogs.msdn.com/David.Wang This posting is provided "AS IS" with no warranties, and confers no rights. // "Shoily Obaidur Rahman" <Shoily Obaidur Rahman@discussions.microsoft.com> wrote in message news:820D6BAE-C86B-4785-A8AF-B89DE39F2496@microsoft.com... > Hi everyone, > > I wrote a ISAPI filter DLL to process text/html content. Whenever there's > a > request for a .php file, the OnUrlMap gets called 3 times whereas .html or > .asp files causes the right behaviour in Filter (i.e. - OnUrlMap gets > called > once only). How do I get rid off this problem? Below is the excerpt of the > code - > > DWORD OnSendRawData(...) { > //Process pvRawData.... > ........ > //Writes HTTP HEADER to client > pfc->WriteClient(....); > //Writes BODY > //pfc->WriteClient(...); > } > > When the code executes for HTTP HEADER, the function gets suspended and > the > second request of the .php file calls OnSendRawData. When any Win32 API > gets > called in the OnSendRawData code, the second request is suspended and the > first one is resumed (i.e.- starts writing the BODY). > > As both are same actually request, it messed up the private (or content > specific) data. > > So, How to stop multiple request in OnUrlMap? > >