<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
I've used an IIS hack engine for a good while, and finally got around
to switching to the main C::E::FastCGI with a few issues.<br>
<br>
1. It works fine, apparently on IIS5<br>
2. It does not work, at least not the way I have it configured, on IIS6<br>
<br>
The issue revolves around the IIS handling of some request parameters;
I get:<br>
<br>
PATH_INFO: /m3analyst/arm.fcgi/index<br>
PATH_TRANSLATED: C:\Sites\ARM\arm.fcgi\index<br>
SCRIPT_NAME: /m3analyst/arm.fcgi<br>
<br>
Problem #1 - the condition is: ( $env-&gt;{SERVER_SOFTWARE} =~
/IIS\/[6-9]\.[0-9]/ )<br>
<br>
This seems to explain why IIS5 is not affected in the same way. The
FastCGI component works just fine on IIS5, so I guess this ought to be
included/processed. <br>
<br>
Problem #2 - FastCGI engine cannot handle IIS with file extension
mapped configuration for FastCGI<br>
<br>
Obviously, IIS is broken with respect to some request parameters. <br>
<br>
The algorthm for fixing IIS appears to be to pop items off a split
PATH_INFO and a split PATH_TRANSLATED as long as they are the same,
unshifting (!) the consistent items into a new value for PATH_INFO.
Whatever was left on the old PATH_INFO is put into SCRIPT_NAME. The
result of my request above, therefore, is:<br>
<br>
PATH_INFO = /arm.fcgi/index<br>
SCRIPT_NAME = /m3analyst<br>
<br>
Since this is incorrect against the namespacing, Catalyst hits the
default action for everything. <br>
<br>
This ought to be:<br>
<br>
PATH_INFO = /index<br>
SCRIPT_NAME = /m3analyst/arm.fcgi<br>
<br>
My hacky IIS engine did a rather simpler:<br>
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; my $path = $env{PATH_INFO};<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; my $script = $env{SCRIPT_NAME};<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; my $length = length($script);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (substr($path, 0, $length) eq $script) {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $env{PATH_INFO} = substr($path, $length);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
<br>
i.e., I left SCRIPT_NAME alone, but removed it from the front of
PATH_INFO when it matched exactly. <br>
<br>
The documentation implies that a wildcard mapping is recommended
(although this is not supported by IIS5). I suspect the algorithm is
completely correct on IIS6/7 with a wildcard mapping.<br>
<br>
Is this likely to require a patch to allow FastCGI to work with file
extension mapping? Shall I write one?<br>
<br>
All the best<br>
Stuart<br>
<div class="moz-signature">-- <br>
<span style="color: rgb(102, 0, 0);">Stuart Watt<br>
ARM Product Developer<br>
Information Balance</span></div>
</body>
</html>