Permalink
Browse files

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

  • Loading branch information...
1 parent a09484c commit 29c7332585d4efdebb2cb560ed0c23213ce11a6f @sammarshallou sammarshallou committed Feb 22, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/filelib.php
View
@@ -3009,6 +3009,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 29c7332

Please sign in to comment.