>From RFC3875 Section 4.1,5:

The PATH_INFO variable specifies a path to be interpreted by the CGI

script.  It identifies the resource or sub-resource to be returned by

the CGI script, and is derived from the portion of the URI path

hierarchy following the part that identifies the script itself.


So, basically, my Perl script is taking a non-compliant IIS/CGI PATH_INFO and 
making it compliant.

Microsoft sucks.

Hopefully, my efforts will help the next poor guy trying to configure Fossil on 
IIS.

Thank you,
Tony Perovic
Compumation, Inc.
________________________________
From: [email protected] 
[mailto:[email protected]] On Behalf Of Richard Hipp
Sent: Tuesday, March 29, 2011 12:38 PM
To: [email protected]
Subject: Re: [fossil-users] Fossil on IIS


On Tue, Mar 29, 2011 at 12:40 PM, Tony Perovic 
<[email protected]<mailto:[email protected]>> wrote:
This is driving me nuts......

I created a CGI file for my repository on the server:


It seems that Fossil uses the PATH_INFO to construct its reply in CGI mode. I 
achieved the correct results by writing a Perl script that strips the 
SCRIPT_NAME portion from the PATH_INFO environment variable before invoking 
Fossil:

$path = $ENV{"PATH_INFO"};
$script = $ENV{"SCRIPT_NAME"};

if ($path =~ m/^$script/) { # PATH_INFO starts with SCRIPT_NAME?
$ENV{"PATH_INFO"} = substr($path, length($script));
}

All Fossil / CGI requests must be processed through this Perl script. Thus, I 
concluded, Fossil/CGI cannot possibly work on Windows/IIS without scripting.

Fossil assumes that PATH_INFO and SCRIPT_NAME are set up as described in 
RFC3875.  If what you say is correct, ISS appears not to follow RFC3875 and 
hence does not really support CGI, but rather something that is merely CGI-like.



Q: Is this correct? Am I missing something?

In fact, given the above analysis, it shouldn't work in Linux either, yet, (I 
assume) it does.

The main Fossil website (http://www.fossil-scm.org/) is just an instance of 
Fossil running on a Linux box as CGI.   See 
http://www.fossil-scm.org/fossil/doc/trunk/www/selfhost.wiki for additional 
information, including the scripts used to enable CGI on the various Fossil 
mirrors.


Q: Can somebody please explain what is or isn't happening in Linux that is or 
isn't happening in Windows/IIS?

Reminds me of a haiku I read years ago:

Yesterday it worked.
Today it is not working.
Windows is like that.


Tony Perovic
Compumation, Inc.
________________________________
From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Tony Perovic
Sent: Tuesday, March 01, 2011 3:58 PM

To: 
'[email protected]<mailto:[email protected]>'
Subject: [fossil-users] Fossil on IIS

Anybody get Fossil working as a "CGI script" on Microsoft Server 2003 / IIS?

I'm trying to access multiple repositories with one script as described at:
http://www.fossil-scm.org/index.html/doc/trunk/www/server.wiki

Learned more than I ever wanted to know about IIS/CGI/Scripting.

[cid:[email protected]]

TONY PEROVIC

[email protected]<mailto:[email protected]>
www.compumation.com<http://www.compumation.com>

205 W. Grand Ave., Ste. 121
Bensenville, IL  60106
630-860-1921<tel:630-860-1921>  Phone
630-860-1928<tel:630-860-1928>  Fax



_______________________________________________
fossil-users mailing list
[email protected]<mailto:[email protected]>
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users



--
D. Richard Hipp
[email protected]<mailto:[email protected]>

<<inline: image001.jpg>>

_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to