[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] CAP::Apache and CAP::Session


Problem:

I have upgraded an application to use CGI::Application::Plugin::Apache which, if you haven't seen changes you app to use Apache::* modules instead of CGI.pm. I also wanted to use the CGI::Application::Plugin::Session module as well since it's easy to use and clean. But it uses the CGI.pm cookie() method to generate the cookie to glean the session id and to create a new cookie for the headers.

Now CAP::Apache does a lot to make sure it can handle headers generated like this but the query object (since it's an Apache::Request object) doesn't have a cookie() method.

A proposed solution would be to modify CAP::Session to either check the type of object that $query is and only use the cookie() method if it's CGI.pm, else use CGI::Cookie since that's what CGI uses under the hood anyway) or it could even check to see if the $ENV{MOD_PERL} is set and if it is, use Apache::Cookie, else use CGI::Cookie.

Either way should work and it would even help those who use other non CGI.pm query objects (like CGI::Simple, etc)

Thoughts ?
--
Michael Peters
Developer
Plus Three, LP


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.