[Catalyst] Problems with HTTPS environment variable and fastcgi static mode

Carl Vincent c.a.vincent at newcastle.ac.uk
Mon Sep 3 16:27:27 GMT 2007


Hi

I'm having trouble with my backend catalyst application. Frontend is
HTTPS but the backend is HTTP.

The backend has this config:

FastCgiServer   apps/e2/script/e2_fastcgi.pl -processes 5 -initial-env
HTTPS=on -initial-env CATALYST_CONFIG_LOCAL_SUFFIX=prod -idle-timeout
120


If I do a $c->log->debug($ENV{HTTPS}) in a controller, the debug shows
the environment has HTTPS set.

However - my uri_for calls are returning http:// type uris.


I've done some poking around and in Catalyst/Engine/CGI.pm

sub prepare_connection {
    my ( $self, $c ) = @_;

    local (*ENV) = $self->env || \%ENV;


The local %ENV is being replaced - and $self->env doesn't contain my
HTTPS setting.

I've not quite grasped where the env is being set or why, but was hoping
someone on the list would point be in the right direction...

Cheers

Carl
(irc: CaptainCarlos)

-- 
     -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
     Carl Vincent             http://www.netskills.ac.uk/ (URL)
     Systems Manager                       0191 222 5003 (voice)
     Netskills, Newcastle University       0191 222 5001  (fax)
     Training  -  Accreditation  -  Consultancy  -  Development



More information about the Catalyst mailing list