[mapserver-commits] r12404 - in trunk/mapserver/mapcache: . include src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:22:55 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:22:55 -0700 (Fri, 26 Aug 2011)
New Revision: 12404

Modified:
   trunk/mapserver/mapcache/geocache.xml
   trunk/mapserver/mapcache/include/geocache.h
   trunk/mapserver/mapcache/src/configuration.c
   trunk/mapserver/mapcache/src/mod_geocache.c
Log:
update docs with new configure keywords and updated apache configuration keywords
thomas.bonfort | 2011-07-08 12:22:40 +0200 (Fri, 08 Jul 2011)

Modified: trunk/mapserver/mapcache/geocache.xml
===================================================================
--- trunk/mapserver/mapcache/geocache.xml	2011-08-26 11:22:50 UTC (rev 12403)
+++ trunk/mapserver/mapcache/geocache.xml	2011-08-26 11:22:55 UTC (rev 12404)
@@ -125,25 +125,6 @@
          </grid>
    --> 
 
-   <!-- french grids -->
-   <grid name="FXX">
-      <extent>-357823.2365 6037008.6939 1313632.3628 7230727.3772</extent>
-      <srs>EPSG:2154</srs>
-      <srsalias>EPSG:310024802</srsalias>
-      <srsalias>IGNF:GEOPORTALFXX</srsalias>
-      <resolutions>2048 1024 512 256 128 64 32 16 8 4 2 1 0.5 0.25 0.125 0.0625</resolutions>
-      <units>m</units>
-      <size>256 256</size>
-   </grid>
-   <grid name="Miller">
-      <extent>-20037504 -10018752 20037504 10018752</extent>
-      <srs>EPSG:310642901</srs>
-      <srsalias>IGNF:MILLER</srsalias>
-      <resolutions>39135.75 19567.875 9783.9375 4891.96875 2445.984375</resolutions>
-      <units>m</units>
-      <size>256 256</size>
-   </grid>
-
    <!--
         a cache is where tiles are stored once they have been rendered
         the only "type" available right now is "disk"
@@ -486,8 +467,6 @@
       <source>osm</source>
       <cache>disk</cache>
       <format>PNG</format>
-      <grid>FXX</grid>
-      <grid>Miller</grid>
       <grid>WGS84</grid>
       <grid>g</grid>
       <metatile>5 5</metatile>
@@ -524,7 +503,7 @@
    <service type="wms" enabled="true">
       <forwarding_rule name="foo rule">
             <http>
-               <url>http://localhost/</url>
+               <url>http://localhost/cgi-bin/mapserv?map=/gro1/mapserver-utils/osm.map</url>
             </http>
       </forwarding_rule>
    </service>
@@ -566,6 +545,5 @@
         this location should be writable by the apache user
    -->
    <lock_dir>/tmp</lock_dir>
-   <pathinfo_hack/>
 
 </geocache>

Modified: trunk/mapserver/mapcache/include/geocache.h
===================================================================
--- trunk/mapserver/mapcache/include/geocache.h	2011-08-26 11:22:50 UTC (rev 12403)
+++ trunk/mapserver/mapcache/include/geocache.h	2011-08-26 11:22:55 UTC (rev 12404)
@@ -823,8 +823,6 @@
     apr_table_t *metadata;
 
     const char *lockdir;
-
-    int pathinfo_hack;
 };
 
 /**

Modified: trunk/mapserver/mapcache/src/configuration.c
===================================================================
--- trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:22:50 UTC (rev 12403)
+++ trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:22:55 UTC (rev 12404)
@@ -1124,11 +1124,6 @@
    }
    apr_dir_close(lockdir);
 
-   if((node = ezxml_child(doc,"pathinfo_hack")) != NULL) {
-      config->pathinfo_hack = 1;
-   } else {
-      config->pathinfo_hack = 0;
-   }
 
 cleanup:
    ezxml_free(doc);

Modified: trunk/mapserver/mapcache/src/mod_geocache.c
===================================================================
--- trunk/mapserver/mapcache/src/mod_geocache.c	2011-08-26 11:22:50 UTC (rev 12403)
+++ trunk/mapserver/mapcache/src/mod_geocache.c	2011-08-26 11:22:55 UTC (rev 12404)
@@ -27,7 +27,6 @@
 #include <http_log.h>
 #include "geocache.h"
 #include <unistd.h>
-#include <stdlib.h>
 
 #ifdef AP_NEED_SET_MUTEX_PERMS
 #include "unixd.h"
@@ -259,6 +258,9 @@
    geocache_cfg *config = NULL;
    geocache_request *request = NULL;
 
+   geocache_context_apache_request *apache_ctx = apache_request_context_create(r); 
+   geocache_context *global_ctx = (geocache_context*)apache_ctx;
+   int ret;
 
    if (!r->handler || strcmp(r->handler, "geocache")) {
       return DECLINED;
@@ -267,20 +269,12 @@
       return HTTP_METHOD_NOT_ALLOWED;
    }
    
-   geocache_context_apache_request *apache_ctx = apache_request_context_create(r); 
-   geocache_context *global_ctx = (geocache_context*)apache_ctx;
-   int ret;
    
-   
 
    params = geocache_http_parse_param_string(global_ctx, r->args);
    config = ap_get_module_config(r->per_dir_config, &geocache_module);
-   char *path_info = r->path_info;
-   if(config->pathinfo_hack) {
-      path_info = r->uri;
-   }
 
-   geocache_service_dispatch_request(global_ctx,&request,path_info,params,config);
+   geocache_service_dispatch_request(global_ctx,&request,r->path_info,params,config);
    if(GC_HAS_ERROR(global_ctx)) {
       return report_error(apache_ctx);
    }
@@ -299,13 +293,13 @@
        * remove the path_info from the end of the url (we want the url of the base of the service)
        * TODO: is there an apache api to access this ?
        */
-      if(*(path_info)) {
-         char *end = strstr(url,path_info);
+      if(*(original->path_info)) {
+         char *end = strstr(url,original->path_info);
          if(end) {
             *end = '\0';
          }
       }
-      request->service->create_capabilities_response(global_ctx,req_caps,url,path_info,config);
+      request->service->create_capabilities_response(global_ctx,req_caps,url,original->path_info,config);
       if(GC_HAS_ERROR(global_ctx)) {
          return report_error(apache_ctx);
       }



More information about the mapserver-commits mailing list