[Mapbender-commits] r2750 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Aug 7 03:39:53 EDT 2008


Author: verenadiewald
Date: 2008-08-07 03:39:52 -0400 (Thu, 07 Aug 2008)
New Revision: 2750

Modified:
   trunk/mapbender/http/classes/class_connector.php
Log:
added condition for variable NOT_PROXY_HOSTS

Modified: trunk/mapbender/http/classes/class_connector.php
===================================================================
--- trunk/mapbender/http/classes/class_connector.php	2008-08-07 07:38:44 UTC (rev 2749)
+++ trunk/mapbender/http/classes/class_connector.php	2008-08-07 07:39:52 UTC (rev 2750)
@@ -43,6 +43,11 @@
 		if ($url) {
 			$this->load($url);
 		}
+
+		// fill array (HOSTs not for Proxy)
+		if (http_ip!=""){
+			$NOT_PROXY_HOSTS_array = split(",", NOT_PROXY_HOSTS);
+		}	
 	}
 	
 	/**
@@ -51,7 +56,12 @@
 	public function load($url) {
 		switch ($this->connectionType) {
 			case "curl":
-				$this->file = $this->getCURL($url);
+				if (in_array($host, $NOT_PROXY_HOSTS_array)){	
+					$this->file = $this->getHTTP($url);				
+				} 
+				else {
+					$this->file = $this->getCURL($url);	
+				}
 				break;
 			case "http":
 				$this->file = $this->getHTTP($url);



More information about the Mapbender_commits mailing list