[Mapbender-commits] r1366 - trunk/mapbender/http/extensions

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Fri May 25 10:26:37 EDT 2007


Author: uli
Date: 2007-05-25 10:26:37 -0400 (Fri, 25 May 2007)
New Revision: 1366

Modified:
   trunk/mapbender/http/extensions/ext_featureInfoTunnel.php
Log:
bug fixed 
tunnel does not work with owsproxy

Modified: trunk/mapbender/http/extensions/ext_featureInfoTunnel.php
===================================================================
--- trunk/mapbender/http/extensions/ext_featureInfoTunnel.php	2007-05-25 13:34:46 UTC (rev 1365)
+++ trunk/mapbender/http/extensions/ext_featureInfoTunnel.php	2007-05-25 14:26:37 UTC (rev 1366)
@@ -16,20 +16,25 @@
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
 require_once("../classes/class_stripRequest.php");
 require_once("../classes/class_connector.php");
 import_request_variables("PG");
 session_start();
 $mr = new stripRequest(urldecode($_REQUEST["url"]));
 $nmr = $mr->encodeGET();
-
-$x = new connector($nmr);
-if (empty($x->file)) {
-     echo "<html><head><title>Kein Abfrageergebnis</title></head><body
-onload='window.close();'></body></html>";
-} 
-else {
-echo $x->file;
+$isOwsproxyRequest = (strpos($nmr,OWSPROXY) === 0);
+if($isOwsproxyRequest){
+	header("Location: ".$nmr);
 }
+else{
+	$x = new connector($nmr);
+	if (empty($x->file)) {
+		//do whatever you want
+		echo $nmr;
+	} 
+	else {
+		echo $x->file;
+	}	
+}
 ?>
\ No newline at end of file



More information about the Mapbender_commits mailing list