[Jifty-commit] r6092 - in jifty/trunk: lib/Jifty

Jifty commits jifty-commit at lists.jifty.org
Wed Dec 10 17:23:38 EST 2008


Author: sartak
Date: Wed Dec 10 17:23:36 2008
New Revision: 6092

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Web.pm

Log:
 r76969 at onn:  sartak | 2008-12-10 17:23:30 -0500
 Intuit https better in Jifty->web->path


Modified: jifty/trunk/lib/Jifty/Web.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web.pm	(original)
+++ jifty/trunk/lib/Jifty/Web.pm	Wed Dec 10 17:23:36 2008
@@ -136,9 +136,10 @@
         # Explicit flag needed because URI->new("noscheme") is structurally
         # different from URI->new("http://smth"). Clunky, but works.
         my $dirty;
-        if ($http_host_env !~ m{^https?://}) {
+        if ($http_host_env !~ m{^http(s?)://}) {
             $dirty++;
             $http_host_env = "http://" . $http_host_env;
+            $http_host_env =~ s/http/https/ if $1 eq 's' || Jifty->web->is_ssl;
         }
         $uri = URI->new($http_host_env);
         if ($dirty && (my $req_uri_env = $ENV{REQUEST_URI})) {


More information about the Jifty-commit mailing list