Pass variable
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.fusch...@gmail.com Web Site: http://www.idelfuschini.it OpenSource Project: http://www.idelfuschini.it/apache-mobile-filter.html
Re: Pass variable
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.foert...@gmx.net
Re: Pass variable
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.foert...@gmx.net
Re: Pass variable
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.foert...@gmx.net >