Hi Mark,

From my limited knowledge, SSL handshake is processed prior doing the HTTP
request-response. Therefore, when apache or mod_perl accepts HTTPS requests, it can't redirect it over HTTPS unless you create another HTTPS request with LWP or WWW::Mechanize, for example.

But if you want to connect to a backend server, why do you need a secure connection anyway?

However, other probably know better...

---
Badai Aqrandista
Cheepy (?)

From: Mark Moseley <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: modperl@perl.apache.org
Subject: Masquerading requests as HTTPS
Date: Thu, 15 Sep 2005 17:05:34 -0700

Greetings. I've been scouring the list and the net for a solution for this
but my apologies in advance if I didn't get the search terms right and
missed a RTFM answer.

I work for a web hosting company and we recently purchased a pair of BigIPs.
These have the ability to terminate SSL connections and then send regular
HTTP to the backend servers (running Apache 1.3.29/mod_perl 1.29 and making
heavy use of transhandlers).

My question for the list is this:
Is there any mod_perl-ish to pretend that a request is coming through SSL?
The main issue I'm facing is that I've got a couple hundred thousands users, many using mod_rewrite in .htaccess files (and a potentially very very large
number and out of my control so modifying them is not an option). Since the
BigIP is retransmitting the request as HTTP, the scheme that the backend
server is using is 'http', not 'https'. So if a redirect is generated via
mod_rewrite, it's redirecting to http://the/url/etc, not https://the/url/etc. Presumably people doing redirects via PHP would have the same issue. However
the URL scheme looks to be somewhat inaccessible from $r and if I parse it
with Apache::URI and use the scheme method there, I don't know of a $r
method to set the URI to the modified URI object.

I've tried setting $ENV{ HTTPS } to 'on', but that didn't help.

Anybody know of a method I might be missing that would help me out?
Basically what I'm trying to accomplish is if I see a request coming in on
port 443, I want to set $r->method( "https" ) -- and I know there's no
method called this, but for explanation sake ;)

Thanks!

_________________________________________________________________
Sell your car for $9 on carpoint.com.au http://www.carpoint.com.au/sellyourcar

Reply via email to