Robert Landrum <[EMAIL PROTECTED]> wrote:
> Tracy12 wrote:
> >How can we retrieve the URL Scheme (http/https ?) from a perl module, Port 
> >given that only input parameter is $r
> >
> >should we use       my $uri = Apache::URI->parse($r) and $uri->scheme;
> I use $r->get_server_port.  If it's 80 it's http, if it's 443, it's 
> https.  Of course, this breaks if you run them on different ports.

If you're running under mod_ssl, you get a lot of extra environment
variables, including a simple flag; the presence of the "HTTPS" environment
variable means SSL is enabled.

http://httpd.apache.org/docs/2.2/mod/mod_ssl.html

        Cheers,
                Tyler

Reply via email to