[Bps-public-commit] r20155 - in RT-Extension-rt_cpan_org/html: .

ruz at bestpractical.com ruz at bestpractical.com
Wed Nov 25 22:43:59 EST 2009


Author: ruz
Date: Wed Nov 25 22:43:58 2009
New Revision: 20155

Added:
   RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Login/Header
Modified:
   RT-Extension-rt_cpan_org/html/autohandler

Log:
* move another part from autohandler into a callback

Added: RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Login/Header
==============================================================================
--- (empty file)
+++ RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Elements/Login/Header	Wed Nov 25 22:43:58 2009
@@ -0,0 +1,14 @@
+<%ARGS>
+$nossl => undef
+</%ARGS>
+<%INIT>
+# check if we are in HTTPS mode
+if ( not defined $nossl
+    and not defined $ENV{'HTTP_X_FORWARDED_HOST'}
+    and ($ENV{'HTTPS'}||'') ne 'on'
+) {
+    $m->redirect(
+        'https://'. RT->Config->Get('WebDomain') . $ENV{REQUEST_URI}
+    );
+}
+</%INIT>

Modified: RT-Extension-rt_cpan_org/html/autohandler
==============================================================================
--- RT-Extension-rt_cpan_org/html/autohandler	(original)
+++ RT-Extension-rt_cpan_org/html/autohandler	Wed Nov 25 22:43:58 2009
@@ -277,13 +277,6 @@
 
 # If we have no credentials
 else {
-    # check if we are in HTTPS mode
-    if ( not defined $ARGS{nossl} 
-        and not defined $ENV{'HTTP_X_FORWARDED_HOST'}
-        and ($ENV{'HTTPS'}||'') ne 'on'
-    ) {
-        $m->redirect('https://'.$ENV{SERVER_NAME}.$ENV{REQUEST_URI});
-    }
     $m->comp( '/Elements/Login', %ARGS );
     $m->abort();
 }



More information about the Bps-public-commit mailing list