[mapserver-commits] r11015 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Feb 25 00:11:24 EST 2011


Author: sdlime
Date: 2011-02-24 21:11:24 -0800 (Thu, 24 Feb 2011)
New Revision: 11015

Modified:
   trunk/mapserver/mapwcs.c
Log:
Applied patch for #3679.

Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c	2011-02-25 05:08:42 UTC (rev 11014)
+++ trunk/mapserver/mapwcs.c	2011-02-25 05:11:24 UTC (rev 11015)
@@ -772,15 +772,23 @@
 {
   char tmpString[OWS_VERSION_MAXLEN];
   int i, tmpInt = 0;
-  int wcsSupportedVersions[] = {OWS_2_0_0, OWS_1_1_2, OWS_1_1_1, OWS_1_1_0, OWS_1_0_0};
-  int wcsNumSupportedVersions = 5;
+  int wcsSupportedVersions[] = {OWS_1_1_2, OWS_1_1_1, OWS_1_1_0, OWS_1_0_0};
+  int wcsNumSupportedVersions = 4;
   const char *updatesequence=NULL;
   const char *encoding;
 
   encoding = msOWSLookupMetadata(&(map->web.metadata), "CO", "encoding");
 
+  /* check version is valid */
+  tmpInt = msOWSParseVersionString(params->version);
+  if (tmpInt == OWS_VERSION_BADFORMAT)
+  {
+    return msWCSException(map, "InvalidParameterValue",
+                          "request", "1.0.0 ");
+  }
+
   /* negotiate version */
-  tmpInt = msOWSNegotiateVersion(msOWSParseVersionString(params->version), wcsSupportedVersions, wcsNumSupportedVersions);
+  tmpInt = msOWSNegotiateVersion(tmpInt, wcsSupportedVersions, wcsNumSupportedVersions);
 
   /* set result as string and carry on */
   params->version = msStrdup(msOWSGetVersionString(tmpInt, tmpString));
@@ -1903,7 +1911,7 @@
      && strcmp(params->version, "1.1.0") != 0
      && strcmp(params->version, "1.1.1") != 0
      && strcmp(params->version, "1.1.2") != 0)
-     && strcmp(params->request, "GetCapabilities") != 0) {
+     && strcasecmp(params->request, "GetCapabilities") != 0) {
     msSetError(MS_WCSERR, "WCS Server does not support VERSION %s.", "msWCSDispatch()", params->version);
     msWCSException(map, "InvalidParameterValue", "version", params->version);
   



More information about the mapserver-commits mailing list