Permalink
Browse files

MDL-38168 Filelib: Curl class does not honour proxybypass option

  • Loading branch information...
1 parent 56d22f1 commit aee5f1f4d810f7ba5ea316147f7df64a45fef5a0 @sammarshallou sammarshallou committed Feb 22, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/filelib.php
View
6 lib/filelib.php
@@ -3057,6 +3057,12 @@ private function apply_opt($curl, $options) {
}
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 '<h1>Options</h1>';
var_dump($this->options);

0 comments on commit aee5f1f

Please sign in to comment.