in reply to $ENV{HTTPS} not consistent

A URL is just a string conforming to the URL specification. If you've got a well formed URL, it should tell you how it needs to be accessed.
use URI::URL; my $b = new URI::URL('httPs://foo.bar.com/baz?brd#red'); print "$b must be accessed using https " if $b->scheme eq 'https'; __END__ https://foo.bar.com/baz?brd#red must be accessed using https
Your webserver should be controlling whether or not $ENV{HTTPS} is set. All CGI.pm does is check $ENV{HTTPS}. If your webserver sets $ENV{HTTPS} when a resource isn't requested during a SSL session, you should get a new webserver (i highly doubt this would happen).

After your program is invoked, you can set $ENV{HTTPS} how you please, so be careful.

Also, if you're running your program from a shell, you're in charge of your environment (in perl, the %ENV hash), so be careful not to set HTTPS.


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
** The Third rule of perl club is a statement of fact: pod is sexy.