[Catalyst] unexpected behavior of $c->request->secure and $c->request->base

Bill Moseley moseley at hank.org
Sat Apr 25 23:13:16 GMT 2009


On Sat, Apr 25, 2009 at 04:23:50PM -0400, Hans Dieter Pearcey wrote:
> On Sat, Apr 25, 2009 at 06:29:50AM -0700, Bill Moseley wrote:
> > The SSL decryption is happening on Apache and Apache is proxying the
> > request to Catalyst.
> 
> What?  No it isn't.  It's using mod_perl; there's no reverse proxying going on
> from the config snippet paste.

Indeed, my mistake -- I assumed a front-end proxy when the original
post mentioned running on a non-standard port.  It didn't even cross
my mind that Catalyst wouldn't be behind a proxy or load balancer.


> 
> Also, this means that Engine::CGI is a red herring.
> 
> Dear original poster: is Apache2::ModSSL installed? 
> 
> Here's the relevant code from Engine::Apache:
> 
>     if ($INC{'Apache2/ModSSL.pm'}) {
>         $c->request->secure(1) if $self->apache->connection->is_https;
>     } else {
>         my $https = $self->apache->subprocess_env('HTTPS'); 
>         $c->request->secure(1) if defined $https and uc $https eq 'ON';
>     }
> 
> The port should have nothing to do with it.

-- 
Bill Moseley.
moseley at hank.org
Sent from my iMutt



More information about the Catalyst mailing list