You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Kris Verbeeck <Kr...@ubizen.com> on 2003/09/12 10:54:30 UTC

Request body validation before content handler phase

Hello,

I'm writing an Apache 2.0 module that has to perform some
request body validation before actually deciding which
content handler to use for response generation.  I'm wondering
what the best way is to implement this.

1) input filter is a no go, because at the moment the body
data passes through the filter, the content handler has
already been picked (and is actually pulling that data
through the input filters).  Right?

2) use the fixup stage, pull all data through the input
filters, spool the data while processing (in memory or
on disk), remove all input filters from the request
structure, insert a new filter that will eventually pass
the spooled data to the content handler

3) something else?

-- 
ir. Kris Verbeeck
Software Engineer

Ubizen - Ubicenter - Philipssite 5 - 3001 Leuven - Belgium
T:  +32 16 28 70 64
F:  +32 16 28 70 77

Ubizen - We Secure e-business - www.ubizen.com

Re: Request body validation before content handler phase

Posted by Nick Kew <ni...@webthing.com>.
On Fri, 12 Sep 2003, Kris Verbeeck wrote:

> I'm writing an Apache 2.0 module that has to perform some
> request body validation before actually deciding which
> content handler to use for response generation.

Are these your own content handlers?  If so, could your module
do its dispatching internally, or make them into output filters,
or any such thing?

> 3) something else?

The more generic approach would be to run the selected handler in a
1.3-style subrequest.

BTW, please don't post a 5.9K sig to a mailinglist.
BTW2, this might be better-suited to apache-modules or usenet than dev.

-- 
Nick Kew