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

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:12:02 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:12:02 -0700 (Fri, 26 Aug 2011)
New Revision: 12263

Modified:
   trunk/mapserver/mapcache/src/service_wmts.c
Log:
add version information to user-agent header
thomas.bonfort | 2011-01-18 10:26:45 +0100 (Tue, 18 Jan 2011)

Modified: trunk/mapserver/mapcache/src/service_wmts.c
===================================================================
--- trunk/mapserver/mapcache/src/service_wmts.c	2011-08-26 11:11:58 UTC (rev 12262)
+++ trunk/mapserver/mapcache/src/service_wmts.c	2011-08-26 11:12:02 UTC (rev 12263)
@@ -204,7 +204,7 @@
             }
             dimensions = apr_pstrcat(ctx->pool,dimensions,"    </Dimension>\n",NULL);
 
-            dimensionstemplate = apr_pstrcat(ctx->pool,dimensionstemplate,dimension->name,"/{",dimension->name,"}/",NULL);
+            dimensionstemplate = apr_pstrcat(ctx->pool,dimensionstemplate,"{",dimension->name,"}/",NULL);
          }
       }
       char *tmsets="";
@@ -234,7 +234,7 @@
             "%s"
             "    </TileMatrixSetLink>\n"
             "    <ResourceURL format=\"%s\" resourceType=\"tile\"\n"
-            "                 template=\"%s/wmts/1.0.0/%s/default/{TileMatrixSet}/{TileMatrix}/%s{TileRow}/{TileCol}.%s\"/>\n"
+            "                 template=\"%s/wmts/1.0.0/%s/default/%s{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}.%s\"/>\n"
             "  </Layer>\n",caps,title,abstract,
             tileset->name,dimensions,tileset->format->mime_type,tmsets,
             tileset->format->mime_type,onlineresource,
@@ -354,23 +354,10 @@
                dimtable = apr_table_make(ctx->pool,tileset->dimensions->nelts);
             int i = apr_table_elts(dimtable)->nelts;
             if(i != tileset->dimensions->nelts) {
-               ctx->log(ctx,GEOCACHE_DEBUG,"add dim %s",key);
                /*we still have some dimensions to parse*/
                geocache_dimension *dimension = APR_ARRAY_IDX(tileset->dimensions,i,geocache_dimension*);
-               if(!strcmp(key,dimension->name)) {
-                  /*we have found the key in the url, advance to next token*/
-                  key = apr_strtok(NULL, "/", &last);
-                  if(!key) {
-                     ctx->set_error(ctx,GEOCACHE_PARSE_ERROR,"failed to parse value for dimension %s",dimension->name);
-                     return;
-                  }
-                  apr_table_set(dimtable,dimension->name,key);
-               } else {
-                  /*key wasn't included in the url*/
-                  ctx->set_error(ctx,GEOCACHE_PARSE_ERROR,"dimension %s not found in request (got %s)",dimension->name, key);
-                  return;
-               }
-            continue;
+               apr_table_set(dimtable,dimension->name,key);
+               continue;
             }
          }
          if(!tilerow) {



More information about the mapserver-commits mailing list