Hello I'm using CGI::Application::Dispatch under mod_perl 2 to display all the pages on a site I'm working on and have had problems getting it to play nicely with path_info as reported by Apache.
What I would like to happen is: Request: http://example.com/foo/bar Calls: run mode bar in module Foo When I set this up as a mod perl handler it doesn't work as expected as the first directory in the path is removed. In the above example I get "/bar" in path_info. I realise this is an Apache issue that it may not be possible to solve, but for information here is my minimal config: <VirtualHost *:80> # missed out some irrelevent stuff DocumentRoot /home/sr/cvs/newforms/connectm_tracker/htdocs <Location /> Allow from all SetHandler perl-script PerlHandler CGI::Application::Dispatch PerlSetVar CGIAPP_DISPATCH_PREFIX Newforms::MembersCGIApp::Dispatch PerlSetVar CGIAPP_DISPATCH_DEFAULT /public/front </Location> </VirtualHost> I assume that because the document root dir does exist the first dir in the request uri is satisfied and so only subsequent dirs are set in PATH_INFO. What it seems I actually want to do is obtain the request uri and pass that to CA::Dispatch. To solve this in the short term I've subclassed CA::Dispatch and overridden the handler() method. The subclass method is exactly the same except for: $ENV{PATH_INFO} = $r->uri(); # was $r->path_info() My questions are: Am I missing something for my apache config that would cause PATH_INFO to include the complete uri path? Is my technique for subclassing CA::Dispatch and using uri rather than path_info reasonable? Are there better ways I could do this? thanks for any advice or suggestions! Simon -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Simon Rees | tech-lists @t zodiac2000 co uk | ORA-03113: end-of-file on communication channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
