From bedd74bc226fdaa9f6f51ec3d8e553d9667a51cd Mon Sep 17 00:00:00 2001 From: sam marshall Date: Fri, 22 Feb 2013 14:15:01 +0000 Subject: [PATCH] MDL-38168 Filelib: Curl class does not honour proxybypass option --- lib/filelib.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/filelib.php b/lib/filelib.php index 3e549904ef2..c965d273b51 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -3078,6 +3078,12 @@ class curl { } curl_setopt($curl, CURLOPT_HTTPHEADER, $this->header); + // Bypass proxy (for this request only) if required. + if (!empty($this->options['CURLOPT_URL']) && + is_proxybypass($this->options['CURLOPT_URL'])) { + unset($this->options['CURLOPT_PROXY']); + } + if ($this->debug){ echo '

Options

'; var_dump($this->options);