Pass variable

Pass variable

am 05.05.2009 10:12:36 von Idel Fuschini

--0016e646074c7580fb046925d729
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi,
I am the owner of "Apache Mobile Filter" project (
https://sourceforge.net/projects/mobilefilter/).
After my filter detect the UserAgent of a device I want to pass the
capability to other applications (cgi, php or tomcat with mod_jk) in the
same web server.
How can I do that ?

Please help me.

--
Idel
=====================
E-Mail: idel.fuschini@gmail.com
Web Site: http://www.idelfuschini.it
OpenSource Project: http://www.idelfuschini.it/apache-mobile-filter.html

--0016e646074c7580fb046925d729
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,
I am the owner of=A0 "Apache Mobile Filter" project ( ef=3D"https://sourceforge.net/projects/mobilefilter/">https: //sourceforge.n=
et/projects/mobilefilter/
).
After my filter detect the UserAgent of =
a device I want to pass the capability to other applications (cgi, php or t=
omcat with mod_jk) in the same web server.

How can I do that ?

Please help me.

--
Ide=
l
==================== =3D
E-M=
ail: =

Web Site: http://www.idelfuschin=
i.it


OpenSource Project: ter.html">http://www.idelfuschini.it/apache-mobile-filter.ht ml


--0016e646074c7580fb046925d729--

Re: Pass variable

am 05.05.2009 10:27:48 von torsten.foertsch

On Tue 05 May 2009, Idel Fuschini wrote:
> I am the owner of =A0"Apache Mobile Filter" project (
> https://sourceforge.net/projects/mobilefilter/).
> After my filter detect the UserAgent of a device I want to pass the
> capability to other applications (cgi, php or tomcat with mod_jk) in
> the same web server.
> How can I do that ?

$r->subprocess_env
$r->headers_in
$r->notes

depends on what the other apps understand. I think subprocess_env is=20
best choice.

Torsten

=2D-=20
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net

Re: Pass variable

am 05.05.2009 11:27:48 von Idel Fuschini

--0016e64612c2674e2e046926e48f
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

thanks torsten

how can I read this variable from php and jsp application ?
I did in perl code:

$r->subprocess_env("XXX" => $value);

In cgi I see something like:

REDIRECT_XXX value

Thanks
Idel

2009/5/5 Torsten Foertsch

> On Tue 05 May 2009, Idel Fuschini wrote:
> > I am the owner of "Apache Mobile Filter" project (
> > https://sourceforge.net/projects/mobilefilter/).
> > After my filter detect the UserAgent of a device I want to pass the
> > capability to other applications (cgi, php or tomcat with mod_jk) in
> > the same web server.
> > How can I do that ?
>
> $r->subprocess_env
> $r->headers_in
> $r->notes
>
> depends on what the other apps understand. I think subprocess_env is
> best choice.
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: torsten.foertsch@gmx.net
>

--0016e64612c2674e2e046926e48f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

thanks torsten

how can I read this variable from php and jsp applica=
tion ?
I did in perl code:

$r->subprocess_env("XXX" =
=3D> $value);

In cgi I see something like:

REDIRECT_XXX va=
lue


Thanks
Idel

2009/5/5 Torsten Foert=
sch <torst=
en.foertsch@gmx.net
>

le=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex;=
padding-left: 1ex;">
On Tue 05 May 2009, Idel Fuschini wrote:

> I am the owner of =A0"Apache Mobile Filter" project (

> blank">https://sourceforge.net/projects/mobilefilter/).

> After my filter detect the UserAgent of a device I want to pass the >
> capability to other applications (cgi, php or tomcat with mod_jk) in r>
> the same web server.

> How can I do that ?



$r->subprocess_env

$r->headers_in

$r->notes



depends on what the other apps understand. I think subprocess_env is

best choice.



Torsten



--

Need professional mod_perl support?

Just hire me: torsten.foertsch@=
gmx.net







--0016e64612c2674e2e046926e48f--

Re: Pass variable

am 05.05.2009 11:44:27 von torsten.foertsch

On Tue 05 May 2009, Idel Fuschini wrote:
> how can I read this variable from php and jsp application ?

subprocess_env manipulates environment variables. So, if your
application can read them it fetches them from that place.

> I did in perl code:
>
> $r->subprocess_env("XXX" => $value);
>
> In cgi I see something like:
>
> REDIRECT_XXX value

Somehow you managed to execute an internal redirect between the time
your filter is invoked and the CGI script. Is there an ErrorDocument
involved? Another way to get an internal redirect is a CGI script that
prints these 2 headers:

Status: 200
Location: /new/url

Apache then copies all environment variables (subprocess_env) from the
original request to the environment of the new (redirected) request
with "REDIRECT_" prepended to all names. That is why you see a
REDIRECT_XXX variable.

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch@gmx.net