Subject: | $ENV{HTTPS} on IIS 'off' vs undef |
Date: | Wed, 28 Oct 2009 10:53:42 -0600 |
To: | bug-CGI-SSI [...] rt.cpan.org |
From: | Josh Kellendonk <josh [...] canequity.com> |
Perl Version: 5.8.3
CGI::SSI version: 0.91
Windows Server 2003 Standard Edition, IIS6
In IIS, $ENV{HTTPS} eq 'off' when not using https. As a result when you
#exec cgi or #include virtual with CGI::SSI in IIS without https it
requests https:// incorrectly, breaking some sites.
In various places, the code looks like this:
$uri->scheme($uri->scheme || ($ENV{HTTPS} ? 'https' : 'http'));
I changed it to this:
$uri->scheme($uri->scheme || (($ENV{HTTPS} && $ENV{HTTPS} ne 'off') ?
'https' : 'http'));