Hi! Thanks for your answer but I have additional question: 1. I have two possibilities to get XXX value: - from database via SQL query - from Radius system via LDAP guery As far as mod_perl is concerned what method would be the best? (more flexible, faster and easier to integrate) 2. A lot of technologies introduces database connection pool. What is the recommended solution for mod_perl (every request in my case required executing query to database) and what solution is recommended for script which uses Apache::Filter::HTTPHeadersFixup? 3. Is LWP required for solve my problem?
Best regards Remek ----- Original Message ----- From: "Stas Bekman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, January 31, 2004 10:25 AM Subject: Re: Apache + mod_proxy + mod_perl + dynamic header information > [EMAIL PROTECTED] wrote: > > Hello! > > I have installed Apache 2.0 server as transparent proxy. I'am looking for > > solution which allow me to add some special and dynamic (from database) > > additional header information on my proxy and send request to destination > > server. > > Algorithm: > > 1. Client send a request from browser (in browser network option proxy is > > set) > > 2. My apache proxy recived request and processing them: > > - read an IP addres of remote user > > - read from database some information for example XXX > > - add to header information special object (x-my-walue = XXX) > > 3. Send this request to destination > > > > Any idea, any tips? Please help me. > > I assume that your destination is outside the same server (so a sub-request > won't work). > > It's probably the best to use mod_proxy to handle the proxying (3). And (2) > can be done with a thin incoming connection filter. Of course you could use > LWP to do the proxying (3), but it may add some overhead. > > You can use Apache::Filter::HTTPHeadersFixup > http://search.cpan.org/dist/Apache-Filter-HTTPHeadersFixup/ > to make (2) really easy for you. > > It has one problem that I don't have a solution for, yet. It's the KeepAlive > connection, discussed in this thread: > http://marc.theaimsgroup.com/?t=107365172200005&r=1&w=2 > I have some ideas on how to solve it. > > To learn more about filters refer to: > http://perl.apache.org/docs/2.0/user/handlers/filters.html > But with Apache::Filter::HTTPHeadersFixup you don't really need to understand > them ;) > > __________________________________________________________________ > Stas Bekman JAm_pH ------> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com > > ---------------------------------------------------------------------- > Ktos czyta Twoja poczte? Zaloz sobie prywatne konto!!! > >>> http://link.interia.pl/f17b7 > > > -- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html