added REQUEST_PROTOCOL

This commit is contained in:
hyung-hwan 2011-02-22 05:26:13 +00:00
parent 5955ddcddf
commit c4f18e49f4
2 changed files with 12 additions and 1 deletions

View File

@ -74,8 +74,9 @@ api_base_url = "http://127.0.0.1"
; https://${SERVER_NAME}/svn. ; https://${SERVER_NAME}/svn.
; You may specify multiple URLs separated with a comma as shown below: ; You may specify multiple URLs separated with a comma as shown below:
; "http://${SERVER_NAME}/svn, https://${SERVER_NAME}/svn" ; "http://${SERVER_NAME}/svn, https://${SERVER_NAME}/svn"
; REQUEST_PROTOCOL is resolved to either http or https.
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
svn_base_url = "http://${SERVER_NAME}:${SERVER_PORT}/svn" svn_base_url = "${REQUEST_PROTOCOL}://${SERVER_NAME}:${SERVER_PORT}/svn"
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; Login model to use. ; Login model to use.

View File

@ -63,6 +63,16 @@ if (CODEPOT_HTTPS_COMPULSORY)
} }
} }
/*
|---------------------------------------------------------------
| EXTRA INFORMATION
|---------------------------------------------------------------
*/
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
$_SERVER['REQUEST_PROTOCOL'] = 'https';
else
$_SERVER['REQUEST_PROTOCOL'] = 'http';
/* /*
|--------------------------------------------------------------- |---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER | LOAD THE FRONT CONTROLLER