First ISAPI Filter
While an ISAPI Filter can add data to the response, it does it at a data
stream level, not HTTP level. Thus, you need to be fully aware of HTTP
rules:
1. If the response is chunked, you must insert the chunk properly
2. If the response is Content-Length, you must modify it to account for the
extra data you added
3. Any Caching implications?
Since the Content-Length header will be sent prior to your decision to add
data to the entity body, you must somehow buffer the entire response, modify
what you need, and send it all back out.
Finally, you need to determine from the data stream where your data
insertion point is going to be. The insertion point could be across HTTP
packets (i.e. cross multiple ISAPI Filter events).
In the end, it's not as easy as just "write an ISAPI Filter which will add a
small piece of html and java script".
IIS has configuration to add "HTML Footers" to static HTML pages, so that
should solve your HTML needs. ASP is not covered.
--
//David
IIS
This posting is provided "AS IS" with no warranties, and confers no rights. //
"Kevin" <kevin_c_r@yahoo.com> wrote in message
news:ce15b76b.0312080715.bef68f0@posting.google.co m...
Hi,
Can anyone help me or point me in the right direction?
I've never written an isapi filter before, but I need to write one
which will add a small piece of html and java script to every html or
asp page severed via my web site?
Can anyone help with how I would go about creating an isapi filter
which could do this for me?
Thanks
Kevin
|