[mapserver-commits] r7293 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Jan 21 20:58:40 EST 2008


Author: tomkralidis
Date: 2008-01-21 20:58:40 -0500 (Mon, 21 Jan 2008)
New Revision: 7293

Modified:
   trunk/mapserver/mapwcs.c
Log:
For GetCapabilities, if VERSION is not passed,
set default to 1.0.0 (#2473)


Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c	2008-01-21 22:58:07 UTC (rev 7292)
+++ trunk/mapserver/mapwcs.c	2008-01-22 01:58:40 UTC (rev 7293)
@@ -1602,7 +1602,13 @@
     return MS_FAILURE;
   }
 
-  /* version is optional, but we do set a default value of 1.0.0, make sure request isn't for something different */
+  /* For GetCapabilities, if version is not set, then set to the highest
+     version supported.  This should be cleaned up once #996 gets implemented */
+  if (!params->version) { /* this is a GetCapabilities request, set version */
+    params->version = strdup("1.0.0");
+  }
+
+  /* version is optional, but we do set a default value of 1.1.1, make sure request isn't for something different */
   if(strcmp(params->version, "1.0.0") != 0
      && strcmp(params->version, "1.1.0") != 0
      && strcmp(params->version, "1.1.1") != 0) {



More information about the mapserver-commits mailing list