[Mapbender-commits] r9383 - trunk/mapbender/http_auth/http
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jan 21 01:32:21 PST 2016
Author: armin11
Date: 2016-01-21 01:32:21 -0800 (Thu, 21 Jan 2016)
New Revision: 9383
Modified:
trunk/mapbender/http_auth/http/index.php
Log:
Fix for persistent URLs in WFS capabilities document
Modified: trunk/mapbender/http_auth/http/index.php
===================================================================
--- trunk/mapbender/http_auth/http/index.php 2016-01-20 15:08:47 UTC (rev 9382)
+++ trunk/mapbender/http_auth/http/index.php 2016-01-21 09:32:21 UTC (rev 9383)
@@ -787,12 +787,19 @@
function getWfsCapabilities($request, $auth = false)
{
global $arrayOnlineresources;
- global $sid, $serviceId;
+ global $sid, $serviceId, $wfsId;
$t = array(htmlentities($arrayOnlineresources["wfs_getcapabilities"]), htmlentities($arrayOnlineresources["wfs_getmap"]),
htmlentities($arrayOnlineresources["wfs_getfeatureinfo"]));
- $new = OWSPROXY . "/" . $sid . "/" . $serviceId . "?";
+ //$new = OWSPROXY . "/" . $sid . "/" . $serviceId . "?";
//TODO - set to persistent url
- //$new = '';
+ $owsproxyUrl = parse_url(OWSPROXY);
+ if ($owsproxyUrl['port'] == '80' || $owsproxyUrl['port'] == '') {
+ $port = "";
+ } else {
+ $port = ":".$owsproxyUrl['port'];
+ }
+ $new = $owsproxyUrl['scheme'] . "://" .$owsproxyUrl['host']. $port . "/registry/wfs/" . $wfsId ."?";
+
//get actual capabilities from external server
if (!$auth) {
$wfsCaps = new connector($request);
More information about the Mapbender_commits
mailing list