[mapserver-commits] r7292 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Jan 21 17:58:07 EST 2008
Author: tomkralidis
Date: 2008-01-21 17:58:07 -0500 (Mon, 21 Jan 2008)
New Revision: 7292
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwcs.c
Log:
make VERSION required for DescribeCoverage and GetCoverage (#2473)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-01-21 22:02:14 UTC (rev 7291)
+++ trunk/mapserver/HISTORY.TXT 2008-01-21 22:58:07 UTC (rev 7292)
@@ -13,6 +13,8 @@
Current Version (5.1-dev, SVN trunk):
-------------------------------------
+- mapwcs.c: require VERSION parameter for DescribeCoverage and GetCoverage (#2473)
+
- mapwcs.c: change error token to MS_WCSERR instead of MS_WMSERR (#2474)
- mapwcs.c: set exception MIME type to application/vnd.ogc.se_xml for 1.0.0 (#2470)
Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c 2008-01-21 22:02:14 UTC (rev 7291)
+++ trunk/mapserver/mapwcs.c 2008-01-21 22:58:07 UTC (rev 7292)
@@ -155,9 +155,6 @@
wcsParamsObj *params;
params = (wcsParamsObj *) calloc(1, sizeof(wcsParamsObj));
- if(params) { /* initialize a few things to default values */
- params->version = strdup("1.0.0");
- }
return params;
}
@@ -1592,6 +1589,19 @@
** ok, it's a WCS request, check what we can at a global level and then dispatch to the various request handlers
*/
+ /* if either DescribeCoverage or GetCoverage, and version not passed
+ then return an exception */
+ if (((strcasecmp(params->request, "DescribeCoverage") == 0) ||
+ (strcasecmp(params->request, "GetCoverage") == 0)) &&
+ (!params->version)) {
+ msSetError(MS_WCSERR, "Missing VERSION parameter", "msWCSDispatch()");
+ msWCSException(map, params->version, "MissingParameterValue", "version");
+ msWCSFreeParams(params); /* clean up */
+ free(params);
+ params = NULL;
+ 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 */
if(strcmp(params->version, "1.0.0") != 0
&& strcmp(params->version, "1.1.0") != 0
More information about the mapserver-commits
mailing list