[mapserver-commits] r10623 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Tue Oct 19 11:49:01 EDT 2010


Author: warmerdam
Date: 2010-10-19 08:49:01 -0700 (Tue, 19 Oct 2010)
New Revision: 10623

Modified:
   trunk/mapserver/mapows.c
Log:
ensure msOwsIsOutputFormatValid() also supports mimetype selection (#3570)

Modified: trunk/mapserver/mapows.c
===================================================================
--- trunk/mapserver/mapows.c	2010-10-19 13:49:00 UTC (rev 10622)
+++ trunk/mapserver/mapows.c	2010-10-19 15:49:01 UTC (rev 10623)
@@ -1896,9 +1896,18 @@
         {
             for (i=0; i<n; i++)
             {
+                int iFormat = msGetOutputFormatIndex( map, tokens[i]);
+                const char *mimetype;
+                if( iFormat == -1 )
+                    continue;
+
+                mimetype =  map->outputformatlist[iFormat]->mimetype;
+
                 msStringTrim(tokens[i]);
                 if (strcasecmp(tokens[i], format) == 0)
                   break;
+                if (strcasecmp(mimetype, format) == 0)
+                  break;
             }
             msFreeCharArray(tokens, n);
             if (i < n)



More information about the mapserver-commits mailing list