Re: global variable

2010-02-03 Thread moli
On Wed, Feb 3, 2010 at 4:18 PM, wrote: > On Wed, Feb 3, 2010 at 3:20 PM, André Warnier wrote: > >> But if you give some more details about the platform, the Apache, and what >> you are trying to do, someone may be able to suggest an alternative. >> >> > > Something linke java servlet's global va

Re: global variable

2010-02-03 Thread moli
On Wed, Feb 3, 2010 at 3:20 PM, André Warnier wrote: > But if you give some more details about the platform, the Apache, and what > you are trying to do, someone may be able to suggest an alternative. > > Something linke java servlet's global variable. Maybe set it via environment variable? Tha

global variable

2010-02-02 Thread moli
Hello, Is there a method to setup a global variable for all modperl child processes? Also this variable will be updated sometime, when it get updated, all processes will know it. Thanks.

Re: rewrite url in modperl

2010-02-01 Thread moli
2010/2/1 Torsten Förtsch : > On Monday 01 February 2010 15:03:53 m...@normalperson.e4ward.com wrote: >> 2010/2/1 Torsten Förtsch : >> > If you don't want the browser to see the actual location of the mp4 file >> > then you need $r->internal_redirect: >> > >> > use Apache2::SubRequest (); >> > ... >

Re: rewrite url in modperl

2010-02-01 Thread moli
2010/2/1 Torsten Förtsch : > If you don't want the browser to see the actual location of the mp4 file then > you need $r->internal_redirect: > > use Apache2::SubRequest (); > ... >    if ( is_valid_ip($ip) ){ >        $r->internal_redirect('/path/12345.mp4'); >        return Apache2::Const::OK; >

rewrite url in modperl

2010-02-01 Thread moli
Hello, I have this modperl handler: use Apache2::RequestRec (); use Apache2::Connection (); use Apache2::RequestUtil (); use Apache2::ServerUtil (); use Apache2::Log (); use Apache2::Request (); use Apache2::Const -compile => qw(OK FORBIDDEN); sub handler { my $r = shift; my $q = Apach

Re: output filter

2010-01-28 Thread moli
Thanks all. Yes the whole pages are generated from mod_perl not PHP. BTW, though we are still using modperl for developing some applications. But it seems other instead technologies are becoming more and more popular, like PHP,Django,Rails etc. Is modperl outdated in today? Regards.

output filter

2010-01-28 Thread moli
Hello, How to set the filter for some output headers? I want to add some Expire: and Cache-Control: headers to make downstream cacheserver to cache the pages. Though they are dynamic pages, but I think they are safe to be cachable. Thanks.