diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php index 3603556b77f0fd46ea00a56d0fb2d9d4bee506f5..c28aaf3681b7a81529ae32f1103d6ba132be8a83 100644 --- a/ecrire/inc/distant.php +++ b/ecrire/inc/distant.php @@ -1181,8 +1181,8 @@ function init_http($method, $url, $refuse_gz = false, $referer = '', $datas = '' $scheme = 'http'; $noproxy = ''; } elseif ($t['scheme'] == 'https') { - $scheme = 'tls'; - $noproxy = 'tls://'; + $scheme = 'ssl'; + $noproxy = 'ssl://'; if (!isset($t['port']) || !($port = $t['port'])) { $t['port'] = 443; } @@ -1280,13 +1280,13 @@ function lance_requete( $connect = ''; if ($http_proxy) { - if (defined('_PROXY_HTTPS_VIA_CONNECT') and $scheme == 'tls') { + if (defined('_PROXY_HTTPS_VIA_CONNECT') and in_array($scheme , array('tls','ssl'))) { $path_host = (!$user ? '' : "$user@") . $host . (($port != 80) ? ":$port" : ''); $connect = 'CONNECT ' . $path_host . " $vers\r\n" . "Host: $path_host\r\n" . "Proxy-Connection: Keep-Alive\r\n"; } else { - $path = (($scheme == 'tls') ? 'https://' : "$scheme://") + $path = (in_array($scheme , array('tls','ssl')) ? 'https://' : "$scheme://") . (!$user ? '' : "$user@") . "$host" . (($port != 80) ? ":$port" : '') . $path; }