This goes back to bug reported back in 2005 by Colin Henein. I'm running Mason under FastCGI and wanted to enable cookies with MasonX::Request::WithApacheSession. The following code fails when session_use_cookie is true: eval { $h = HTML::Mason::CGIHandler->new( # Base config comp_root => "$mason_root/", data_dir => "$mason_data/", allow_globals => $::MASON_GLOBALS, error_mode => "output", default_escape_flags => "h",
# ApacheHandler request_class => 'MasonX::Request::WithApacheSession', session_class => 'Apache::Session::DB_File', session_file_name => "$mason_data/sessiondata/session.db", session_lock_directory => "$mason_data/sessionlock", session_use_cookie => 1, session_cookie_domain => $site, session_cookie_name => "${site}_sessiondata", session_cookie_expires => '+1d', ) } or do { croak "Could not create mason cgihandler: $@" }; The error is: " The header_object parameter is required in order to use cookies outside of mod_perl" What is happening is that $self->can('cgi_process') returns false with HTML::Mason::CGIHandler Version 1.00. This prevents header_object from getting set, resulting in the aforementioned error. Changing the elsif condition to $self->can('cgi_request') eliminates the problem. I made this change locally and it works for me. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users