diff --git a/ecrire/inc/distant.php b/ecrire/inc/distant.php index 2803c55067f8f01ff7d8a4dae59a445c7079f92d..6d91efb502e3547635053402977bd37abdda3acb 100644 --- a/ecrire/inc/distant.php +++ b/ecrire/inc/distant.php @@ -1484,8 +1484,12 @@ function lance_requete( $site = isset($GLOBALS['meta']['adresse_site']) ? $GLOBALS['meta']['adresse_site'] : ''; + $host_port = $host; + if ($port != (in_array($scheme , array('tls','ssl')) ? 443 : 80)) { + $host_port .= ":$port"; + } $req = "$method $path $vers\r\n" - . "Host: $host\r\n" + . "Host: $host_port\r\n" . 'User-Agent: ' . _INC_DISTANT_USER_AGENT . "\r\n" . ($refuse_gz ? '' : ('Accept-Encoding: ' . _INC_DISTANT_CONTENT_ENCODING . "\r\n")) . (!$site ? '' : "Referer: $site/$referer\r\n")