[cgiapp] CGI::Application::Dispatch Question

Brad Van Sickle bvansickle3 at gmail.com
Mon May 10 09:36:55 EDT 2010


It appears that Dispatch.pm is never getting a value for $ENV{PATH_INFO}

Printing out my environment hash, I can see that PATH_INFO is not 
available as an option, however I do have a REQUEST_URI option that 
looks like it might work. 

in my dispatch handler I  attempted to set the PATH_INFO key with the 
contents of REQUEST_URI:
$ENV{PATH_INFO} = $ENV{REQUEST_URI};

However, it still seems like Dispatch.pm was unable to get a value.  
After a little reverse engineering I found that $ENV_PATH info was being 
overwritten by a mod_perl method inside Dispatch.pm:

   # set the PATH_INFO
   $ENV{PATH_INFO} = $r->path_info();

I simply commented out this line id Dispatch.pm and it seems to be 
working now, however I suspect that this is not the "best" solution.  
Are there any suggestions on a better way to handle this?





Michael Peters wrote:
> On 05/07/2010 06:43 PM, Brad Van Sickle wrote:
>>   I have a handler set up under mod_perl to send all requests
>> that start with /dispatchperl/ to my dispatcher, and I have verfiied
>> that this setup is  infact handling requests, but none of my request
>> rules are matching.
>
> Try setting "debug" to true and then check your error log to see why 
> things aren't working as you expect.
>


More information about the cgiapp mailing list