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).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
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. |
In reply to Re: $ENV{HTTPS} not consistent
by PodMaster
in thread $ENV{HTTPS} not consistent
by nutshell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |