diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php
index 96af93786a403a9ea975e29f377ad366ce68e9e3..2803c55067f8f01ff7d8a4dae59a445c7079f92d 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"