[mapserver-commits] r12367 - trunk/mapserver/mapcache/src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:20:06 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:20:06 -0700 (Fri, 26 Aug 2011)
New Revision: 12367

Modified:
   trunk/mapserver/mapcache/src/configuration.c
   trunk/mapserver/mapcache/src/service_demo.c
Log:
replace potentially dangerous characters in dimension values when building disk cache directory structure
thomas.bonfort | 2011-05-24 11:43:53 +0200 (Tue, 24 May 2011)

Modified: trunk/mapserver/mapcache/src/configuration.c
===================================================================
--- trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:20:01 UTC (rev 12366)
+++ trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:20:06 UTC (rev 12367)
@@ -1017,7 +1017,11 @@
    config->getmap_strategy = GEOCACHE_GETMAP_ERROR;
    if ((node = ezxml_child(doc,"full_wms")) != NULL) {
       if(!strcmp(node->txt,"assemble")) {
+#ifdef USE_CAIRO
          config->getmap_strategy = GEOCACHE_GETMAP_ASSEMBLE;
+#else
+         ctx->set_error(ctx,400, "\"assemble\" <full_wms> not supported with current build. reconfigure with --enable-cairo");
+#endif
       } else if(!strcmp(node->txt,"forward")) {
          config->getmap_strategy = GEOCACHE_GETMAP_FORWARD;
       } else if(*node->txt && strcmp(node->txt,"error")) {

Modified: trunk/mapserver/mapcache/src/service_demo.c
===================================================================
--- trunk/mapserver/mapcache/src/service_demo.c	2011-08-26 11:20:01 UTC (rev 12366)
+++ trunk/mapserver/mapcache/src/service_demo.c	2011-08-26 11:20:06 UTC (rev 12367)
@@ -450,22 +450,22 @@
                ol_layer_name);
          caps = apr_psprintf(ctx->pool,"%s%s",caps,ol_layer);
 
-#ifdef USE_CAIRO
-         ol_layer = apr_psprintf(ctx->pool,demo_layer_singletile,
-               ol_layer_name,
-               tileset->name,
-               grid->name,
-               apr_pstrcat(ctx->pool,url_prefix,"/wms?",NULL),
-               tileset->name,resolutions,unit,
-               grid->extent[0],
-               grid->extent[1],
-               grid->extent[2],
-               grid->extent[3],
-               grid->srs,
-               smerc,
-               ol_layer_name);
-         caps = apr_psprintf(ctx->pool,"%s%s",caps,ol_layer);
-#endif
+         if(ctx->config->getmap_strategy != GEOCACHE_GETMAP_ERROR) {
+            ol_layer = apr_psprintf(ctx->pool,demo_layer_singletile,
+                  ol_layer_name,
+                  tileset->name,
+                  grid->name,
+                  apr_pstrcat(ctx->pool,url_prefix,"/wms?",NULL),
+                  tileset->name,resolutions,unit,
+                  grid->extent[0],
+                  grid->extent[1],
+                  grid->extent[2],
+                  grid->extent[3],
+                  grid->srs,
+                  smerc,
+                  ol_layer_name);
+            caps = apr_psprintf(ctx->pool,"%s%s",caps,ol_layer);
+         }
       }
       tileindex_index = apr_hash_next(tileindex_index);
    }



More information about the mapserver-commits mailing list