Encapsulate logic for determining if an SSL request has been made.

Refactor core modules to use that.
This commit is contained in:
Colin Kuskie 2009-08-19 18:25:00 +00:00
parent 39127b7ec0
commit 1c9908f490
5 changed files with 23 additions and 17 deletions

View file

@ -1273,11 +1273,7 @@ sub getUrl {
and -e $self->getPath . '/.cdn' )
{
my $sep = '/'; # separator, if not already present trailing
if ($cdnCfg->{'sslAlt'}
and ( $self->session->env->get('HTTPS') eq 'on'
or $self->session->env->get('SSLPROXY') )
)
{
if ($cdnCfg->{'sslAlt'} && $self->session->env->sslRequest) {
if ( $cdnCfg->{'sslUrl'} ) {
substr( $cdnCfg->{'sslUrl'}, -1 ) eq '/' and $sep = '';
$url = $cdnCfg->{'sslUrl'} . $sep . $self->getDirectoryId;