IIS/CGI sets the following environmental variable:
SERVER_SOFTWARE=Microsoft-IIS/6.0
So you could look for that.

IIS has another bug that prevents Set-Cookie and Redirection within the same 
HTTP response. IIS tries to be efficient by executing the redirection without 
involving the browser but fails to pass along the cookie so the Login/Logout 
pages don't work. I had to script around that too. Now that I've got all that 
worked out I'm battling the Active Directory security model. Painful.

Are you sure you want to start modifying Fossil to compensate for IIS 
idiosyncrasies (bugs)? Judging by the lack of responses I've gotten, I don't 
think there are too many Fossil on IIS/CGI users out there. A Wiki page with 
detailed instructions might suffice.

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


On Tue, Mar 29, 2011 at 2:14 PM, Tony Perovic 
<[email protected]<mailto:[email protected]>> wrote:
>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.

Are their any other distinguishing environment variables that IIS outputs?  
Perhaps we can add special code to Fossil to work around the IIS bug.

Or, perhaps we can add a special parameter to the "cgi" file that starts up 
Fossil.  In addition to the "repository:" line, add a new line something like:

     iis-bug-workaround=yes

The issue is that the PATH_INFO environment variable is not removing the 
SCRIPT_NAME prefix?




________________________________




From: 
[email protected]<mailto:[email protected]>
 
[mailto:[email protected]<mailto:[email protected]>]
 On Behalf Of Richard Hipp
Sent: Tuesday, March 29, 2011 12:38 PM

To: [email protected]<mailto:[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]>

_______________________________________________
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