[Mapbender-commits] r9708 - trunk/mapbender/owsproxy/http
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Mar 22 06:06:03 PDT 2017
Author: armin11
Date: 2017-03-22 06:06:03 -0700 (Wed, 22 Mar 2017)
New Revision: 9708
Modified:
trunk/mapbender/owsproxy/http/index.php
Log:
First draft to also get ows requests that come via post
Modified: trunk/mapbender/owsproxy/http/index.php
===================================================================
--- trunk/mapbender/owsproxy/http/index.php 2017-03-22 13:04:57 UTC (rev 9707)
+++ trunk/mapbender/owsproxy/http/index.php 2017-03-22 13:06:03 UTC (rev 9708)
@@ -25,6 +25,7 @@
require_once(dirname(__FILE__) . "/../../http/classes/class_mb_exception.php");
require_once(dirname(__FILE__) . "/./classes/class_QueryHandler.php");
$urlsToExclude = array();
+$postData = false;
if (is_file(dirname(__FILE__) . "/../../conf/excludeproxyurls.conf"))
{
require_once(dirname(__FILE__) . "/../../conf/excludeproxyurls.conf");
@@ -39,11 +40,18 @@
$height = 400;
/* * *** conf **** */
-$postdata = $HTTP_RAW_POST_DATA;
$owsproxyService = $_REQUEST['wms']; //ToDo: change this to 'service' in the apache url-rewriting
-$query = new QueryHandler();
+//test for existing post data
+$postData = file_get_contents("php://input");
+if (isset($postData) && $postData !== '') {
+
+} else {
+ $postData = false;
+}
+$query = new QueryHandler($postData);
+
// an array with keys and values toLowerCase -> caseinsensitiv
$reqParams = $query->getRequestParams();
@@ -182,7 +190,7 @@
if (strtoupper($key) === "SERVICE")
$found = true;
}
- if (!$found)
+ if (!$found && ($reqParams['service'] == '' || !isset($reqParams['service'])))
$query->setParam("service", "WMS");
$reqParams = $query->getRequestParams();
}
More information about the Mapbender_commits
mailing list