[Mapbender_dev] [Mapbender] #885: Conflicts between owsproxy and mb js cache

Mapbender mapbender_dev at lists.osgeo.org
Tue Dec 11 01:46:26 PST 2012


#885: Conflicts between owsproxy and mb js cache
----------------------+-----------------------------------------------------
 Reporter:  obgr      |       Owner:  dev  
     Type:  defect    |      Status:  new  
 Priority:  critical  |   Milestone:       
Component:  core      |     Version:  2.7.3
 Keywords:            |  
----------------------+-----------------------------------------------------

Comment(by obgr):

 As far as I see, the only place, where the js cache file is read is in
 http/javascript/initWmcObj.php

 So wouldn't a patch like the following work?

 ********************************************************************************
 diff --git a/http/javascripts/initWmcObj.php
 b/http/javascripts/initWmcObj.php
 index 84bbfcb..ce727e6 100644
 --- a/http/javascripts/initWmcObj.php
 +++ b/http/javascripts/initWmcObj.php
 @@ -78,6 +78,7 @@ else {
  $fileName = md5($app);
  $applicationLoadFile = "../../cache/".$fileName.".app.cache.js";

 +
  //if there is no GET param from outside and the cache file for gui
 loading exists, load outputstring from file
  if($activateCache && !Mapbender::session()->get("mb_wmc") &&
       !getConfiguration("WMC") &&
 @@ -88,6 +89,7 @@ if($activateCache &&
 !Mapbender::session()->get("mb_wmc") &&
       file_exists($applicationLoadFile)
       ) {
      $outputString = file_get_contents($applicationLoadFile);
 +    $outputString = preg_replace('|/owsproxy/.*/|U',
 '/owsproxy/'.session_id().'/', $outputString);
  }
  else {
      $wmcDocSession = false;
 ********************************************************************************

 Of course it is crude, but...

-- 
Ticket URL: <https://trac.osgeo.org/mapbender/ticket/885#comment:2>
Mapbender <http://www.mapbender.org/>
Mapbender


More information about the Mapbender_dev mailing list