diff --git a/lib/filelib.php b/lib/filelib.php index 2fda3478737..5569c5ea45c 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -3215,7 +3215,14 @@ class curl { $this->proxy_type = CURLPROXY_SOCKS5; } else { $this->proxy_type = CURLPROXY_HTTP; - $this->setopt(array('httpproxytunnel'=>false)); + $this->setopt([ + 'httpproxytunnel' => false, + ]); + if (defined('CURLOPT_SUPPRESS_CONNECT_HEADERS')) { + $this->setopt([ + 'suppress_connect_headers' => true, + ]); + } } $this->setopt(array('proxytype'=>$this->proxy_type)); }