[Mapbender-commits] r9775 - in trunk/mapbender: http_auth/http owsproxy/http

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri Aug 25 02:33:45 PDT 2017


Author: armin11
Date: 2017-08-25 02:33:44 -0700 (Fri, 25 Aug 2017)
New Revision: 9775

Modified:
   trunk/mapbender/http_auth/http/index.php
   trunk/mapbender/owsproxy/http/index.php
Log:
Fix owsproxy handling for missing request parameter service - default to wms

Modified: trunk/mapbender/http_auth/http/index.php
===================================================================
--- trunk/mapbender/http_auth/http/index.php	2017-08-25 09:01:58 UTC (rev 9774)
+++ trunk/mapbender/http_auth/http/index.php	2017-08-25 09:33:44 UTC (rev 9775)
@@ -238,7 +238,7 @@
 $reqParams = $query->getRequestParams();*/
 
 $n = new administration();
-if (!(isset($reqParams['service'])) AND strtolower($reqParams['request'])=='getmap') { 
+if (!(isset($reqParams['service'])) AND (strtolower($reqParams['request'])=='getmap' || strtolower($reqParams['request'])=='getlegendgraphic')) { 
 	$reqParams['service'] = 'wms'; 
 } 
 //check for type of ows requested

Modified: trunk/mapbender/owsproxy/http/index.php
===================================================================
--- trunk/mapbender/owsproxy/http/index.php	2017-08-25 09:01:58 UTC (rev 9774)
+++ trunk/mapbender/owsproxy/http/index.php	2017-08-25 09:33:44 UTC (rev 9775)
@@ -220,12 +220,15 @@
 //
 if (count($_REQUEST) > 0) {
     foreach ($_REQUEST as $key => $value) {
-        if (strtoupper($key) === "SERVICE")
+        if (strtoupper($key) === "SERVICE") {
             $found = true;
+	}
     }
-    if (!$found && ($reqParams['service'] == '' || !isset($reqParams['service'])))
-        $query->setParam("service", "WMS");
+    if (!$found && ($reqParams['service'] == '' || !isset($reqParams['service']))) {
+        $query->setParam("service", "wms");
 	$reqParams = $query->getRequestParams();
+	$reqParams['service'] = "wms";
+    }
 }
 //check for kind of service
 switch (strtolower($reqParams['service'])) {
@@ -372,6 +375,7 @@
             $url = $url . getConjunctionCharacter($url) . "SLD=" . $reqParams['sld'];
         }	
         if (isset($auth)) {
+	    $e = new mb_exception("external url: ".$url);
             getImage(false, $url, $auth);
         } else {
             getImage(false, $url);



More information about the Mapbender_commits mailing list