Skip to content
Permalink
Browse files

Disable raw layers for getMap and getFeatureInfo WMS requests.

  • Loading branch information...
sdlime committed May 9, 2017
1 parent 3d6cd8a commit 68a9140fd3962f55c8837cbf017bb4641c2c9656
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/service_wms.c
@@ -200,7 +200,7 @@ void _create_capabilities_wms(mapcache_context *ctx, mapcache_request_get_capabi

if(tileset->format->type == GC_RAW) {
tileindex_index = apr_hash_next(tileindex_index);
continue; // WMS is not supported for raw layers
continue; /* WMS is not supported for raw layers */
}

layerxml = ezxml_add_child(toplayer,"Layer",0);
@@ -534,7 +534,7 @@ void _mapcache_service_wms_parse_request(mapcache_context *ctx, mapcache_service
key = apr_strtok(layers, ",", &last); /* extract first layer */
}
main_tileset = mapcache_configuration_get_tileset(config,key);
if(!main_tileset) {
if(!main_tileset || main_tileset->format->type == GC_RAW) {
errcode = 404;
errmsg = apr_psprintf(ctx->pool,"received wms request with invalid layer %s", key);
goto proxies;
@@ -633,7 +633,7 @@ void _mapcache_service_wms_parse_request(mapcache_context *ctx, mapcache_service
* this step is not done for the first tileset as we have already performed it
*/
tileset = mapcache_configuration_get_tileset(config,key);
if (!tileset) {
if (!tileset || tileset->format->type == GC_RAW) {
errcode = 404;
errmsg = apr_psprintf(ctx->pool,"received wms request with invalid layer %s", key);
goto proxies;
@@ -733,7 +733,7 @@ void _mapcache_service_wms_parse_request(mapcache_context *ctx, mapcache_service
goto proxies;
} else {
mapcache_tileset *tileset = mapcache_configuration_get_tileset(config,str);
if(!tileset) {
if(!tileset || tileset->format->type == GC_RAW) {
errcode = 404;
errmsg = apr_psprintf(ctx->pool,"received wms getfeatureinfo request with invalid layer %s", str);
goto proxies;

0 comments on commit 68a9140

Please sign in to comment.
You can’t perform that action at this time.