[mapserver-commits] r7335 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Jan 30 19:34:35 EST 2008
Author: tomkralidis
Date: 2008-01-30 19:34:35 -0500 (Wed, 30 Jan 2008)
New Revision: 7335
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapwcs.c
Log:
better handling of REQUEST parameter (#2490)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2008-01-31 00:11:25 UTC (rev 7334)
+++ trunk/mapserver/HISTORY.TXT 2008-01-31 00:34:35 UTC (rev 7335)
@@ -13,6 +13,8 @@
Current Version (5.1-dev, SVN trunk):
-------------------------------------
+- mapwcs.c: better handling of REQUEST parameter (#2490)
+
- mapwcs.c: point to correct exception schema (#2481)
- mapows.c: add version negotiation (#996)
Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c 2008-01-31 00:11:25 UTC (rev 7334)
+++ trunk/mapserver/mapwcs.c 2008-01-31 00:34:35 UTC (rev 7335)
@@ -1652,6 +1652,17 @@
** ok, it's a WCS request, check what we can at a global level and then dispatch to the various request handlers
*/
+ /* check for existence of REQUEST parameter */
+ if (!params->request) {
+ msSetError(MS_WCSERR, "Missing REQUEST parameter", "msWCSDispatch()");
+ msWCSException(map, params->request, "MissingParameterValue", "request");
+ msWCSFreeParams(params); /* clean up */
+ free(params);
+ params = NULL;
+ return MS_FAILURE;
+ }
+
+
/* if either DescribeCoverage or GetCoverage, and version not passed
then return an exception */
if (((strcasecmp(params->request, "DescribeCoverage") == 0) ||
@@ -1694,6 +1705,14 @@
return msWCSDescribeCoverage(map, params);
else if(strcasecmp(params->request, "GetCoverage") == 0)
return msWCSGetCoverage(map, request, params);
+ else {
+ msSetError(MS_WCSERR, "Invalid REQUEST parameter \"%s\"", "msWCSDispatch()", params->request);
+ msWCSException(map, params->request, "InvalidParameterValue", "request");
+ msWCSFreeParams(params); /* clean up */
+ free(params);
+ params = NULL;
+ return MS_FAILURE;
+ }
return MS_DONE; /* not a WCS request, let MapServer take it */
#else
More information about the mapserver-commits
mailing list