RE: automatic redirect to https

2002-05-14 Thread Aaron J Mackey
] Subject: automatic redirect to https 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

Re: automatic redirect to https

2002-05-14 Thread Geoffrey Young
Aaron J Mackey wrote: Yes: simply because I want to be able to install the software at new sites with minimal httpd.conf twiddling (and the user has a configuration file in which they can switch on/off the SSL requirement). in that case, you probably want to check

automatic redirect to https

2002-05-13 Thread Aaron J Mackey
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

Re: automatic redirect to https

2002-05-13 Thread Geoffrey Young
Aaron J Mackey wrote: 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());

Re: automatic redirect to https

2002-05-13 Thread Aaron J Mackey
On Mon, 13 May 2002, Geoffrey Young wrote: my $uri = Apache::URI-parse($r); Well, now $uri-unparse yields this: null: https://_default_/mydirectory; Which of course doesn't work in the Location field of the redirect. I can munge this as I need, but I was hoping for something cleaner.

Re: automatic redirect to https

2002-05-13 Thread Geoffrey Young
Aaron J Mackey wrote: On Mon, 13 May 2002, Geoffrey Young wrote: my $uri = Apache::URI-parse($r); Well, now $uri-unparse yields this: null: https://_default_/mydirectory; Which of course doesn't work in the Location field of the redirect. I can munge this as I need, but I was

Re: automatic redirect to https

2002-05-13 Thread Aaron J Mackey
On Mon, 13 May 2002, Geoffrey Young wrote: hmm, that's interesting - I guess you're catching a VirtualHost _default_ setting? If so, there's probably not much you can do about it save something like my $uri = Apache:URI-parse($r); $uri-hostname($r-headers_in-get('Host')); That did the

RE: automatic redirect to https

2002-05-13 Thread Christian Gilmore
-Original Message- From: Aaron J Mackey [mailto:[EMAIL PROTECTED]] Sent: Monday, May 13, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: automatic redirect to https Can anyone see something wrong with this, or suggest a better mechanism: unless ( $ENV{HTTPS} ) { # bounce