fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16959] api: apply correct request scheme on url


From: sigurdne
Subject: [Fmsystem-commits] [16959] api: apply correct request scheme on url
Date: Wed, 9 Aug 2017 05:35:55 -0400 (EDT)

Revision: 16959
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16959
Author:   sigurdne
Date:     2017-08-09 05:35:54 -0400 (Wed, 09 Aug 2017)
Log Message:
-----------
api: apply correct request scheme on url

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.sessions.inc.php

Modified: trunk/phpgwapi/inc/class.sessions.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.sessions.inc.php   2017-08-09 09:09:38 UTC (rev 
16958)
+++ trunk/phpgwapi/inc/class.sessions.inc.php   2017-08-09 09:35:54 UTC (rev 
16959)
@@ -599,15 +599,16 @@
                                }
                        }
 
+                       $request_scheme = empty($_SERVER['HTTPS']) || 
$_SERVER['HTTPS'] == 'off' ? 'http' : 'https';
+
                        if($external || 
$GLOBALS['phpgw_info']['server']['webserver_url'] == '/')
                        {
                                if(substr($url, 0, 4) != 'http')
                                {
-                                       $url = 
"http://{$GLOBALS['phpgw_info']['server']['hostname']}{$url}";
+                                       $url = 
"{$request_scheme}://{$GLOBALS['phpgw_info']['server']['hostname']}{$url}";
                                }
                        }
 
-                       $request_scheme = empty($_SERVER['HTTPS']) || 
$_SERVER['HTTPS'] == 'off' ? 'http' : 'https';
 
                        if($request_scheme == 'https')
                        {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]