[mapserver-commits] r7363 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Feb 7 11:13:38 EST 2008


Author: tomkralidis
Date: 2008-02-07 11:13:38 -0500 (Thu, 07 Feb 2008)
New Revision: 7363

Modified:
   trunk/mapserver/mapwms.c
Log:
check for SERVICE parameter first (#2495)


Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c	2008-02-07 03:09:36 UTC (rev 7362)
+++ trunk/mapserver/mapwms.c	2008-02-07 16:13:38 UTC (rev 7363)
@@ -2918,12 +2918,8 @@
   for(i=0; i<req->NumParams; i++) {
       if(strcasecmp(req->ParamNames[i], "VERSION") == 0)
         version = req->ParamValues[i];
-      else if (strcasecmp(req->ParamNames[i], "WMTVER") == 0 && nVersion == -1)
-      {
-        nVersion = msOWSParseVersionString(req->ParamValues[i]);
-        if (nVersion == -1)
-            return msWMSException(map, OWS_1_1_1, NULL); /* Invalid format */
-      }
+      else if (strcasecmp(req->ParamNames[i], "WMTVER") == 0 && version == NULL)
+        version = req->ParamValues[i];
       else if (strcasecmp(req->ParamNames[i], "UPDATESEQUENCE") == 0)
         updatesequence = req->ParamValues[i];
       else if (strcasecmp(req->ParamNames[i], "REQUEST") == 0)
@@ -2936,6 +2932,10 @@
         format = req->ParamValues[i];
   }
 
+  /* if SERVICE is not specified, this is not a WMS request */
+  if (service == NULL)
+    return MS_DONE;
+
   /* If SERVICE is specified then it MUST be "WMS" */
   if (service != NULL && strcasecmp(service, "WMS") != 0)
       return MS_DONE;  /* Not a WMS request */



More information about the mapserver-commits mailing list