[mapserver-commits] r11178 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed Mar 16 15:34:26 EDT 2011


Author: schpidi
Date: 2011-03-16 12:34:26 -0700 (Wed, 16 Mar 2011)
New Revision: 11178

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapwcs.c
   trunk/mapserver/mapwcs20.c
Log:
Honour maxsize limits on WCS 2.0 responses (#3204).
Removed duplicated check in WCS 1.x.


Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2011-03-16 19:29:01 UTC (rev 11177)
+++ trunk/mapserver/HISTORY.TXT	2011-03-16 19:34:26 UTC (rev 11178)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Honour MAXSIZE for WCS 2.0 responses (#3204).
+
 - fallback to ows_title for WCS ows:Title of CoverageDescription (#3528)
 
 - Added msIO_stripStdoutBufferContentHeaders() to strip off all Content-* headers from a buffer (#3673, #3665).

Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c	2011-03-16 19:29:01 UTC (rev 11177)
+++ trunk/mapserver/mapwcs.c	2011-03-16 19:34:26 UTC (rev 11178)
@@ -1828,21 +1828,12 @@
   /* Are we exceeding the MAXSIZE limit on result size? */
   if(map->width > map->maxsize || map->height > map->maxsize )
   {
-      msSetError(MS_WCSERR, "Raster size out of range, width and height must be no more than MAXSIZE=%d.", "msWCSGetCoverage()", map->maxsize);
+      msSetError(MS_WCSERR, "Raster size out of range, width and height of resulting coverage must be no more than MAXSIZE=%d.", "msWCSGetCoverage()", map->maxsize);
 
       return msWCSException(map, "InvalidParameterValue", 
                             "width/height", params->version);
   }
 
-  /* Are we exceeding the MAXSIZE limit on result size? */
-  if(map->width > map->maxsize || map->height > map->maxsize )
-  {
-      msSetError(MS_WCSERR, "Raster size out of range, width and height must be no more than MAXSIZE=%d.", "msWCSGetCoverage()", map->maxsize);
-
-      return msWCSException(map, "InvalidParameterValue", 
-                            "width/height", params->version);
-  }
-
   /* adjust OWS BBOX to MapServer's pixel model */
   if( strncasecmp(params->version,"1.0",3) == 0 ) {
     params->bbox.minx += params->resx*0.5;

Modified: trunk/mapserver/mapwcs20.c
===================================================================
--- trunk/mapserver/mapwcs20.c	2011-03-16 19:29:01 UTC (rev 11177)
+++ trunk/mapserver/mapwcs20.c	2011-03-16 19:34:26 UTC (rev 11178)
@@ -3508,6 +3508,15 @@
     map->width = params->width;
     map->height = params->height;
 
+    /* Are we exceeding the MAXSIZE limit on result size? */
+    if(map->width > map->maxsize || map->height > map->maxsize )
+    {
+        msSetError(MS_WCSERR, "Raster size out of range, width and height of resulting coverage must be no more than MAXSIZE=%d.", "msWCSGetCoverage20()", map->maxsize);
+
+        return msWCSException(map, "InvalidParameterValue", 
+                                   "size", params->version);
+    }
+
     /* Mapserver only supports square cells */
     if (params->resolutionX <= params->resolutionY)
         map->cellsize = params->resolutionX;



More information about the mapserver-commits mailing list