$self->charset('');
# Redirect to SSL if required
- if (Param('sslbase') ne '' and Param('ssl') eq 'always') {
+ if (Param('sslbase') ne '' and Param('ssl') eq 'always' and i_am_cgi()) {
$self->require_https(Param('sslbase'));
}
detaint_signed
html_quote url_quote value_quote xml_quote
css_class_quote
+ i_am_cgi
lsearch max min
diff_arrays diff_strings
trim wrap_comment find_wrap_point
return $var;
}
+sub i_am_cgi {
+ # I use SERVER_SOFTWARE because it's required to be
+ # defined for all requests in the CGI spec.
+ return exists $ENV{'SERVER_SOFTWARE'} ? 1 : 0;
+}
+
sub lsearch {
my ($list,$item) = (@_);
my $count = 0;