From aee5f1f4d810f7ba5ea316147f7df64a45fef5a0 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 4713d82145b..c908d80b1bc 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -3057,6 +3057,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);