You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Anthony Wells <aw...@cd-crafters.com> on 2004/08/23 01:17:17 UTC

Re: POST to SSI? [was: Using APR]

Bill,

Thanks for the info.

Didn't know if you have seen this thread from the mod_perl mailing list?

http://www.gossamer-threads.com/lists/modperl/dev/6764#6764

I found it of particular interest given what I am trying to accomplish.  I
also wanted to iterate that I'm trying to design my approach to this problem
so as not to brake anything down the request chain.  In short,  I'm wanting
to pass an input socket in place of the real socket for each request down
the chain.  This way, any generators, filters, etc won't blow-up when they
attempt to read the POST data themselves.

I'm not sure if my recent installation of Apache 2 has been built around
libapreq-2.  I am using DSO, so this may not be a problem for my custom
modules.

Course, I am wondering, if I do use apreq-2 to parse the POST data, how do I
then pass this POST data to the subrequest which is definitly headed for
mod_jk2?  Did I miss something in the apreq-2 function list?

Since there are so many who wish to pass the POST data around the request
chain, I think it would be a wise choice for apreq to become the "required"
data handler.

Geesh, I didn't know what I was getting into with this project!!!

Anthony

----- Original Message -----
From: "William A. Rowe, Jr." <wr...@rowe-clan.net>
To: <o....@oxys.net>
Cc: <ap...@covalent.net>; "Anthony Wells" <aw...@cd-crafters.com>
Sent: Sunday, August 22, 2004 2:57 PM
Subject: Re: POST to SSI? [was: Using APR]


> At 05:09 AM 8/22/2004, you wrote:
> >On Sun, 22 Aug 2004, Cliff Woolley wrote:
> >
> >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.
>
> Or investigate a method to enable apreq-2 parsing of the post/get
> data for mod_include.  It might be slick to roll apreq-2 as the
> recommended get/post variable handling for httpd-2.2 - I really
> suspect this is the simplest approach, Anthony.
>
> Bill
>
>


Re: POST to SSI? [was: Using APR]

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Anthony Wells" <aw...@cd-crafters.com> writes:

> Thanks for the info Joe.  I'm starting to understand the apreq functionality
> better now.  I believe I will need to add/set the apreq filter to the
> subrequest rec_req->input_filters before calling ap_run_sub.  I will test
> this to be certain toward the middle of this week.

Once you figure it out, please let us know on the apreq-dev@ list.
It'd be great to add some subrequest tests to httpd-apreq-2 cvs.

-- 
Joe Schaefer


Re: POST to SSI? [was: Using APR]

Posted by Anthony Wells <aw...@cd-crafters.com>.
Thanks for the info Joe.  I'm starting to understand the apreq functionality
better now.  I believe I will need to add/set the apreq filter to the
subrequest rec_req->input_filters before calling ap_run_sub.  I will test
this to be certain toward the middle of this week.

Anthony

----- Original Message -----
From: "Joe Schaefer" <jo...@sunstarsys.com>
To: <de...@apr.apache.org>
Sent: Sunday, August 22, 2004 7:54 PM
Subject: Re: POST to SSI? [was: Using APR]


> "Anthony Wells" <aw...@cd-crafters.com> writes:
>
> [...]
>
> > Course, I am wondering, if I do use apreq-2 to parse the POST data,
> > how do I then pass this POST data to the subrequest which is definitly
> > headed for mod_jk2?  Did I miss something in the apreq-2 function list?
>
> You don't need to do anything special- the POST data in the
> apreq filter will automatically be passed on to mod_jk2 (assuming
> you're doing an internal redirect; I'm not sure what happens on a
> subrequest).  See httpd-apreq-2/env/c-modules/apreq_redirect_test
> for an example of using apreq with a redirect.
>
> --
> Joe Schaefer
>


Re: POST to SSI? [was: Using APR]

Posted by Joe Schaefer <jo...@sunstarsys.com>.
"Anthony Wells" <aw...@cd-crafters.com> writes:

[...]

> Course, I am wondering, if I do use apreq-2 to parse the POST data,
> how do I then pass this POST data to the subrequest which is definitly
> headed for mod_jk2?  Did I miss something in the apreq-2 function list?

You don't need to do anything special- the POST data in the 
apreq filter will automatically be passed on to mod_jk2 (assuming 
you're doing an internal redirect; I'm not sure what happens on a 
subrequest).  See httpd-apreq-2/env/c-modules/apreq_redirect_test 
for an example of using apreq with a redirect.

-- 
Joe Schaefer