]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/httpclient.php
Configuration options for using an HTTP proxy
[quix0rs-gnu-social.git] / lib / httpclient.php
index 514a5afeb2a91810544252aec7dc0e03b7f4d88d..04e2b9ac6539c9b884b7f50f0a33d25e792081f2 100644 (file)
@@ -149,6 +149,14 @@ class HTTPClient extends HTTP_Request2
             $this->config['adapter'] = 'HTTP_Request2_Adapter_Curl';
         }
 
+        foreach (array('host', 'port', 'user', 'password', 'auth_scheme') as $cf) {
+            $k = 'proxy_'.$cf;
+            $v = common_config('http', $k); 
+            if (!empty($v)) {
+                $this->config[$k] = $v;
+            }
+        }
+
         parent::__construct($url, $method, $config);
         $this->setHeader('User-Agent', $this->userAgent());
     }