You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by simon simon <ne...@gmail.com> on 2010/03/09 05:47:29 UTC

Read post data

hi there,
I am using ap_setup_client_block() and ap_get_client_block() methods of API
to read POST request, Request body is being read properly, but there is
another module waiting these data, it never receive it (also use
ap_setup_client_block() and ap_get_client_block() methods)

Any ideas can solve this?


Thanks

Re: Read post data

Posted by Jeff Trawick <tr...@gmail.com>.
On Tue, Mar 9, 2010 at 7:45 AM, simon simon <ne...@gmail.com> wrote:
> Hi,
>  Many thanks for the tip
>  I have two modules, one have received the body with ap_get_client_block()(I
> have no source), it handle the content,
>  the other one need dispatch the original body to some servers.
>
>  so, I don't know how can i get the body

several modules in the 2.2.x distribution show how to read the body
from an input filter; modules/experimental/mod_case_filter_in.c is one
example; mod_deflate.c is another (the list goes on)

Re: Read post data

Posted by simon simon <ne...@gmail.com>.
Hi,
 Many thanks for the tip
 I have two modules, one have received the body with ap_get_client_block()(I
have no source), it handle the content,
 the other one need dispatch the original body to some servers.

 so, I don't know how can i get the body



2010/3/9 Jeff Trawick <tr...@gmail.com>

> On Mon, Mar 8, 2010 at 11:47 PM, simon simon <ne...@gmail.com> wrote:
> > hi there,
> > I am using ap_setup_client_block() and ap_get_client_block() methods of
> API
> > to read POST request, Request body is being read properly, but there is
> > another module waiting these data, it never receive it (also use
> > ap_setup_client_block() and ap_get_client_block() methods)
> >
> > Any ideas can solve this?
>
> What role are the modules trying to play?
>
> Only one handler can retrieve the body with ap_get_client_block().  n
> filters can see the body that some handler retrieves.
>
> (And ap_get_client_block() isn't the only way for a handler to
> retrieve the body, but that is beside the point.)
>

Re: Read post data

Posted by Jeff Trawick <tr...@gmail.com>.
On Mon, Mar 8, 2010 at 11:47 PM, simon simon <ne...@gmail.com> wrote:
> hi there,
> I am using ap_setup_client_block() and ap_get_client_block() methods of API
> to read POST request, Request body is being read properly, but there is
> another module waiting these data, it never receive it (also use
> ap_setup_client_block() and ap_get_client_block() methods)
>
> Any ideas can solve this?

What role are the modules trying to play?

Only one handler can retrieve the body with ap_get_client_block().  n
filters can see the body that some handler retrieves.

(And ap_get_client_block() isn't the only way for a handler to
retrieve the body, but that is beside the point.)