[Catalyst] Mapping CGI scripts URLs
christian at lackas.net
Fri Nov 21 18:57:11 GMT 2008
I have ported an old CGI-script based application to Catalyst, and would
like to continue to support the old interface, which means that I have
URLs such as:
which now should get mapped to '/cgi/script', which is handled by my Cgi
Controller and it's script function (have multiple of these scripts).
I know how to use for instance Apache with RewriteEngine to get this
done, however, then the Catalyst own server does not work; which I use a
lot for development.
Thus, I though I could just define a similar rewriting in the default
method of the Root-Controller, which kind of works, but not if I use
URLs that end on '.cgi'. For everything else (.CGI, .pl, ...), default
is called, but just not for '.cgi'. Which apparently immediately closes
the connection with no reply (also no debug message is created, or
I assume this is some kind of strange safety feature?
Unfortunately, I was not yet able to find where in the code this happens
and how I turn this off.
Can anyone out there help me with this?
Googling for variations of 'catalyst dispatcher .cgi close' was not very
successful (too many unrelated hits) as was a find/grep through the
Catalyst sources for '.cgi'.
More information about the Catalyst