From c5d507fd8e09f996c5686fc6492b71a341922113 Mon Sep 17 00:00:00 2001
From: Cerdic <cedric@yterium.com>
Date: Sat, 29 Sep 2018 13:54:37 +0000
Subject: [PATCH] Fix #3969 : on passe par defaut via connect quand le mode
 proxy est selectionnne

---
 ecrire/inc/distant.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php
index 96af93786a..2803c55067 100644
--- a/ecrire/inc/distant.php
+++ b/ecrire/inc/distant.php
@@ -1402,7 +1402,7 @@ function lance_requete(
 
 	$connect = '';
 	if ($http_proxy) {
-		if (defined('_PROXY_HTTPS_VIA_CONNECT') and in_array($scheme , array('tls','ssl'))) {
+		if (!defined('_PROXY_HTTPS_NOT_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"
-- 
GitLab