apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Wells" <awe...@cd-crafters.com>
Subject Re: [apache-modules] Re: Using APR
Date Sun, 22 Aug 2004 14:33:01 GMT
Just so everyone isn't in the dark about what I'm trying to do :)

I'm trying to modify mod_include so that it initially reads POST content and
stores that in a block of memory in the request pool.  I was trying to use
the bucket brigade to fill the area of memory but I'm not sure how to create
a pipe to the block of memory.  (Now I know why I like Java so
much...ByteArrayOutputStream).  Oh, and not to worry about eating up memory
from a rogue request, I will have a variable cLimit (contentLimit) which
will limit the size of the content.

Next, when the handle_include function is called for an include, I want to
first retrieve the block of memory from the pool, then create an input
stream from the the block of memory (ByteArrayInputStream in Java).  The
next step is to give this input stream to the sub request (rr)'s
apr_input_filters and modify the method (change it back to that of the
original request) before calling ap_run_sub_req(rr).  The goal is to allow
each include access to the original POST data as though it was the original
request.

Also, I'm setting this up so that it requires the directive vinclude instead
of include.

Anthony

----- Original Message -----
From: "Nick Kew" <nick@webthing.com>
To: <dev@apr.apache.org>
Cc: <apache-modules@covalent.net>
Sent: Sunday, August 22, 2004 6:09 AM
Subject: [apache-modules] Re: Using APR


> On Sun, 22 Aug 2004, Cliff Woolley wrote:
>
> > directory for tons of examples on how to use bucket brigades.  You can
> > also look at the two ApacheCon talks that I've given on bucket brigades
> > (see http://www.cs.virginia.edu/~jcw5q/talks/).  You might also pick up
a
> > copy of Ryan Bloom's book, Apache Server 2.0: The Complete Reference.
>
> For the record, I replied on apache-modules only, with a reference to
> my introductory article at http://www.apachetutor.org/dev/brigades
> Having just seen the reference to your 2002 talk, I've added your
> talk as a reference.
>
> To the OP in reply to your direct contact explaining more about your
> problem, you might want to look at the input filter in mod_security,
> which does something broadly similar.  But if you want to POST to SSI
> you've got a simpler, more fundamental issue to deal with: the default
> handler - the one that just sends a file - doesn't accept POST.  If your
> data are not large, a simple handler that converts the data to GET
> and does an internal redirect might be a simpler workaround.
>
> --
> Nick Kew
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net
> For additional commands, e-mail: apache-modules-help@covalent.net
>


Mime
View raw message