|
|
|
date: Thu, 24 Jan 2008 14:20:30 -0800,
group: microsoft.public.platformsdk.internet.server.isapi-dev
back
Re: How to get postdata from isapi filter?
"David Wang" wrote:
> On Jan 24, 2:20 pm, John wrote:
> > I am trying to write a filter to do "post" processing (process the webpage
> > that is otherwise ready to be sent to the client). However, I would also
> > like to have access to the entire postdata (eg the page is from a submitted
> > form).
> >
> > Here is what I found out:
> > 1) my filter has to register for SF_NOTIFY_READ_RAW_DATA. This forces my
> > filter to be registered as a global filter.
> > 2) I will get notified ONLY if the actual handler (extension that processes
> > the page) requests postdata (eg do a ReadClient to pull the posted data).
> > Otherwise, my filter will not be called and I do not the postdata.
> >
> > Questions:
> > 1) How can I (as a filter) get the postdata regardless if the hander
> > requests the postdata?
> > 2) Related, I would like to get all the HTTP headers and server variables as
> > well. When (which event(s)) would be a good place to do that? Is there any
> > way to get ALL of them (like in extension).
> >
> > Thanks for any help in advance!
>
>
> For which IIS version?
>
> Your approach is really, really bad. If you want to parse raw input/
> output data, why don't you write your own proxy server in front of IIS
> to do what you want. What you are trying to do kills SSL and response
> caching on IIS.
>
>
> //David
> http://w3-4u.blogspot.com
> http://blogs.msdn.com/David.Wang
> //
Thanks David,
Can you provide more info about how to do that with a proxy server (eg
samples, tutorial, etc)? I do not know too much about that.
date: Fri, 25 Jan 2008 08:58:03 -0800
author: John
Re: How to get postdata from isapi filter?
"John" wrote:
>
>
> "David Wang" wrote:
>
> > On Jan 24, 2:20 pm, John wrote:
> > > I am trying to write a filter to do "post" processing (process the webpage
> > > that is otherwise ready to be sent to the client). However, I would also
> > > like to have access to the entire postdata (eg the page is from a submitted
> > > form).
> > >
> > > Here is what I found out:
> > > 1) my filter has to register for SF_NOTIFY_READ_RAW_DATA. This forces my
> > > filter to be registered as a global filter.
> > > 2) I will get notified ONLY if the actual handler (extension that processes
> > > the page) requests postdata (eg do a ReadClient to pull the posted data).
> > > Otherwise, my filter will not be called and I do not the postdata.
> > >
> > > Questions:
> > > 1) How can I (as a filter) get the postdata regardless if the hander
> > > requests the postdata?
> > > 2) Related, I would like to get all the HTTP headers and server variables as
> > > well. When (which event(s)) would be a good place to do that? Is there any
> > > way to get ALL of them (like in extension).
> > >
> > > Thanks for any help in advance!
> >
> >
> > For which IIS version?
> >
> > Your approach is really, really bad. If you want to parse raw input/
> > output data, why don't you write your own proxy server in front of IIS
> > to do what you want. What you are trying to do kills SSL and response
> > caching on IIS.
> >
> >
> > //David
> > http://w3-4u.blogspot.com
> > http://blogs.msdn.com/David.Wang
> > //
Thanks again David,
I have read some of yours posts about the concerns (particularly this
very good one --
http://blogs.msdn.com/david.wang/archive/2006/05/10/HOWTO-Access-POST-form-data-with-ISAPI.aspx).
We may have to proceed with getting the postdata in the filter. Is it true
that if the handler does not request postdata, then there is no way for the
filter to get it or there are ways the filter can still get it?
date: Fri, 25 Jan 2008 10:01:03 -0800
author: John
|
|