You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Devender Reddy <mu...@gmail.com> on 2007/02/16 11:33:39 UTC

Interaction between modules....

I had written an Apache Module, which will do some kind of parsing on the
user entered POST variables and then talks to Server Y. Following are the
things that I had done for this.

1) Gets the user entered inputs like name, age etc. Along with this, I will
also get a hidden variable "hide"
2) In my module, I will do the parsing, in such a way that the hidden
variable "hide" will be stored in my module and name and age will be passed
to the remote server(say Y) and my modules is sitting in server X.
3) Depending upon the parameters, the remote server Y will return me some
response.
4) Now I have to append this response to my stored hidden variable. let us
call this data DATA. (Upto here,  I had done without no problems.)


Now I want to pass this DATA(response+hide) to PHP module to the server X(
where my module is sitting).

in one way, I can say, once my module gets some response, then how do we
pass this response to the PHP module.

Thanks in advance for doing this favor.

-- 
Thanks & Regards
Dev

Re: Interaction between modules....

Posted by Nick Kew <ni...@webthing.com>.
On Sun, 18 Feb 2007 22:20:01 +0100
Joachim Zobel <jz...@heute-morgen.de> wrote:

> Am Sonntag, den 18.02.2007, 12:12 +0530 schrieb Devender Reddy:
> > So, it would be great, if you can let me know the equivalent
> > functanality of filters in apache 1.3.
> 
> Filters are actually _the_ reason to use 2.

:-)

>	 The best thing you can do
> is read the POST parameters during an early request phase an pass the
> new values as GET parameters (POST is read from stdin and can't be
> read twice).

You can actually hack it by hijacking the request, and running
the 'original' request as a subrequest.  It's ugly, but it works.

(Agreed, filters are by far the single most important advance
in Apache 2).

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/

Re: Interaction between modules....

Posted by Joachim Zobel <jz...@heute-morgen.de>.
Am Sonntag, den 18.02.2007, 12:12 +0530 schrieb Devender Reddy:
> So, it would be great, if you can let me know the equivalent functanality of
> filters in apache 1.3.

Filters are actually _the_ reason to use 2. The best thing you can do is
read the POST parameters during an early request phase an pass the new
values as GET parameters (POST is read from stdin and can't be read
twice).

Sincerely,
Joachim






Re: Interaction between modules....

Posted by Devender Reddy <mu...@gmail.com>.
Thats true, this looks like an input filter. But filters are supported only
in Apache 2.x version and currently my apache version is 1.3. Most probably,
we may not be upgrading to apache 2.0 in the near future.

So, it would be great, if you can let me know the equivalent functanality of
filters in apache 1.3.

Thanks & Regards
Dev


On 2/17/07, Joachim Zobel <jz...@heute-morgen.de> wrote:
>
> Am Freitag, den 16.02.2007, 16:03 +0530 schrieb Devender Reddy:
> > Now I want to pass this DATA(response+hide) to PHP module to the server
> X(
> > where my module is sitting).
> >
> > in one way, I can say, once my module gets some response, then how do we
> > pass this response to the PHP module.
>
> This looks like a job for an input filter. If your module is an input
> filter, that changes the POST data, your PHP simply has to handle a POST
> request.
>
> Sincerely,
> Joachim
>
>
>


-- 
Thanks & Regards
Dev

Re: Interaction between modules....

Posted by Joachim Zobel <jz...@heute-morgen.de>.
Am Freitag, den 16.02.2007, 16:03 +0530 schrieb Devender Reddy:
> Now I want to pass this DATA(response+hide) to PHP module to the server X(
> where my module is sitting).
> 
> in one way, I can say, once my module gets some response, then how do we
> pass this response to the PHP module.

This looks like a job for an input filter. If your module is an input
filter, that changes the POST data, your PHP simply has to handle a POST
request.

Sincerely,
Joachim