From 63372c8f4a59e99f9849cffdb66d7ab60bde1e8b Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sat, 26 Jan 2008 21:45:14 +0000
Subject: [PATCH] report de [11120]

---
 ecrire/inc/distant.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php
index 62f2dbcd53..adf4cc08a8 100644
--- a/ecrire/inc/distant.php
+++ b/ecrire/inc/distant.php
@@ -471,7 +471,11 @@ function init_http($get, $url, $refuse_gz=false, $uri_referer = '') {
 	$host = $t['host'];
 	if ($t['scheme'] == 'http') {
 		$scheme = 'http'; $scheme_fsock='';
-	} else {
+	} elseif ($t['scheme'] == 'https') {
+		$scheme = 'ssl'; $scheme_fsock='ssl://';
+		if (!isset($t['port']) || !($port = $t['port'])) $t['port'] = 443;
+	} 
+	else {
 		$scheme = $t['scheme']; $scheme_fsock=$scheme.'://';
 	}
 	if (!isset($t['port']) || !($port = $t['port'])) $port = 80;
-- 
GitLab