Can anyone see something wrong with this, or suggest a better mechanism:

    unless ( $ENV{HTTPS} ) {
        # bounce request to secure port
        my $uri = $r->parsed_uri();
        $uri->scheme('https');
        $r->header_out(Location => $uri->unparse());
        return REDIRECT;
    }

This doesn't seem to work for me; the browser acts as if it's in an
eternal redirection loop.  And the server's error log says that a child
segfaulted in the process.  The $uri->unparse yields a string like
"https:/mydirectory" when I access "http://myserver.org/mydirectory";.  Do
I need to rebuild the entire URI manually?

Thanks,

-Aaron

Reply via email to