[mapserver-commits] r9331 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Sep 23 09:22:42 EDT 2009


Author: assefa
Date: 2009-09-23 09:22:40 -0400 (Wed, 23 Sep 2009)
New Revision: 9331

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapwms.c
Log:
WMS 1.3.0 expects a CRS parameter instead of SRS (#2979)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2009-09-22 15:12:03 UTC (rev 9330)
+++ trunk/mapserver/HISTORY.TXT	2009-09-23 13:22:40 UTC (rev 9331)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- WMS 1.3.0 expects a CRS parameter instead of SRS (#2979)
+
 - Allow users to set wms getmap and getlegendgraphic image format list (#455)
 
 - Fixed MapScript shapeObj->toWkt() segfaults (#2763)

Modified: trunk/mapserver/mapwms.c
===================================================================
--- trunk/mapserver/mapwms.c	2009-09-22 15:12:03 UTC (rev 9330)
+++ trunk/mapserver/mapwms.c	2009-09-23 13:22:40 UTC (rev 9331)
@@ -521,7 +521,8 @@
         styles = values[i];
 
     }
-    else if (strcasecmp(names[i], "SRS") == 0 || strcasecmp(names[i], "CRS") == 0) {
+    else if ((strcasecmp(names[i], "SRS") == 0 && nVersion < OWS_1_3_0) || 
+             (strcasecmp(names[i], "CRS") == 0 && nVersion >= OWS_1_3_0)) {
       srsfound = 1;
       /* SRS is in format "EPSG:epsg_id" or "AUTO:proj_id,unit_id,lon0,lat0" */
       if (strncasecmp(values[i], "EPSG:", 5) == 0)
@@ -704,7 +705,7 @@
     }
   }
 
-   /*validate the exception format WMS 1.3.0 section 7.4.3.5*/
+   /*validate the exception format WMS 1.3.0 section 7.3.3.11*/
 
    if (nVersion >= OWS_1_3_0 && wms_exception_format != NULL)
    {    
@@ -1142,7 +1143,11 @@
   if (request && strcasecmp(request, "DescribeLayer") != 0) {
     if (srsfound == 0)
     {
-      msSetError(MS_WMSERR, "Missing required parameter SRS", "msWMSLoadGetMapParams()");
+      if ( nVersion >= OWS_1_3_0)
+        msSetError(MS_WMSERR, "Missing required parameter CRS", "msWMSLoadGetMapParams()");
+      else
+        msSetError(MS_WMSERR, "Missing required parameter SRS", "msWMSLoadGetMapParams()");
+
       return msWMSException(map, nVersion, "MissingParameterValue");
     }
 



More information about the mapserver-commits mailing list