[mapserver-commits] r11202 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Thu Mar 17 13:54:50 EDT 2011


Author: warmerdam
Date: 2011-03-17 10:54:50 -0700 (Thu, 17 Mar 2011)
New Revision: 11202

Modified:
   trunk/mapserver/mapoutput.c
Log:
MAke sure a user defined outputformat is used in preference to 
default outputformats if IMAGETYPE not set.


Modified: trunk/mapserver/mapoutput.c
===================================================================
--- trunk/mapserver/mapoutput.c	2011-03-17 17:53:55 UTC (rev 11201)
+++ trunk/mapserver/mapoutput.c	2011-03-17 17:54:50 UTC (rev 11202)
@@ -125,7 +125,10 @@
 {
     outputFormatObj *format;
 
-    /* default to the first of these if IMAGETYPE not set. */
+    /* If IMAGETYPE not set use the first user defined OUTPUTFORMAT.
+       If none, use the first default format. */
+    if( map->imagetype == NULL && map->numoutputformats > 0 )
+        map->imagetype = msStrdup(map->outputformatlist[0]->name);
     if( map->imagetype == NULL)
         map->imagetype = msStrdup(defaultoutputformats[0].name);
 



More information about the mapserver-commits mailing list