[Mapbender-commits] r4345 - branches/2.6/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Jul 13 04:40:06 EDT 2009


Author: astrid_emde
Date: 2009-07-13 04:40:06 -0400 (Mon, 13 Jul 2009)
New Revision: 4345

Modified:
   branches/2.6/http/classes/class_connector.php
Log:
class_connector did not handle NOT_PROXY_HOSTS from mapbender.conf (for curl) aktivated this again

Modified: branches/2.6/http/classes/class_connector.php
===================================================================
--- branches/2.6/http/classes/class_connector.php	2009-07-13 08:32:43 UTC (rev 4344)
+++ branches/2.6/http/classes/class_connector.php	2009-07-13 08:40:06 UTC (rev 4345)
@@ -44,11 +44,6 @@
 			$url = func_get_arg(0);
 			$this->load($url);
 		}
-
-		// fill array (HOSTs not for Proxy)
-		if (http_ip!=""){
-			$NOT_PROXY_HOSTS_array = split(",", NOT_PROXY_HOSTS);
-		}	
 	}
 	
 	/**
@@ -61,10 +56,17 @@
 		}
 		switch ($this->connectionType) {
 			case "curl":
-				if (in_array($host, $NOT_PROXY_HOSTS_array)){	
-					$this->file = $this->getHTTP($url);				
-				} 
+		        $host = parse_url($url,PHP_URL_HOST);
+		        
+		        // fill array (HOSTs not for Proxy)
+		        $NOT_PROXY_HOSTS_array = explode(",", NOT_PROXY_HOSTS);
+
+				if (in_array($host, $NOT_PROXY_HOSTS_array)){
+				        $e = new mb_notice("HTTP host:".$host);
+					$this->file = $this->getHTTP($url);
+				}
 				else {
+				     	$e = new mb_notice("CURL host:".$host);
 					$this->file = $this->getCURL($url);	
 				}
 				break;



More information about the Mapbender_commits mailing list