Skip to content

Commit b05f58f

Browse files
author
besstiolle
committed
fix HTTPS/HTTP issue under Cherokee Webserver : blueimp#1312
1 parent 75d1117 commit b05f58f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/php/upload.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ function __construct($options=null) {
6767

6868
protected function getFullUrl() {
6969
return
70-
(isset($_SERVER['HTTPS']) ? 'https://' : 'http://').
70+
((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https://' : 'http://').
7171
(isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'].'@' : '').
7272
(isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ($_SERVER['SERVER_NAME'].
73-
(isset($_SERVER['HTTPS']) && $_SERVER['SERVER_PORT'] === 443 ||
73+
(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' && $_SERVER['SERVER_PORT'] === 443 ||
7474
$_SERVER['SERVER_PORT'] === 80 ? '' : ':'.$_SERVER['SERVER_PORT']))).
7575
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
7676
}

0 commit comments

Comments
 (0)