[mapserver-commits] r10204 - in branches/branch-5-6/mapserver: . mapscript/php3

svn at osgeo.org svn at osgeo.org
Wed Jun 2 09:57:51 EDT 2010


Author: aboudreault
Date: 2010-06-02 09:57:48 -0400 (Wed, 02 Jun 2010)
New Revision: 10204

Modified:
   branches/branch-5-6/mapserver/HISTORY.TXT
   branches/branch-5-6/mapserver/mapscript/php3/php_mapscript.c
Log:
Backport in 5.6: Fixed imageObj->saveImage() sends unnecessary headers (#3418)

Modified: branches/branch-5-6/mapserver/HISTORY.TXT
===================================================================
--- branches/branch-5-6/mapserver/HISTORY.TXT	2010-06-02 04:54:39 UTC (rev 10203)
+++ branches/branch-5-6/mapserver/HISTORY.TXT	2010-06-02 13:57:48 UTC (rev 10204)
@@ -15,6 +15,8 @@
 Version 5.6.4 (????-??-??):
 ---------------------------
 
+- Fixed imageObj->saveImage() sends unnecessary headers (#3418) 
+
 - Correct PropertyName parsing for wfs post requests (#3235)
 
 - Ensure mapwmslayer.c does not unlink file before closing connection on it (#3451)

Modified: branches/branch-5-6/mapserver/mapscript/php3/php_mapscript.c
===================================================================
--- branches/branch-5-6/mapserver/mapscript/php3/php_mapscript.c	2010-06-02 04:54:39 UTC (rev 10203)
+++ branches/branch-5-6/mapserver/mapscript/php3/php_mapscript.c	2010-06-02 13:57:48 UTC (rev 10204)
@@ -36,6 +36,7 @@
 #include "SAPI.h"
 #include "ext/standard/info.h"
 #include "ext/standard/head.h"
+#include "main/php_output.h" 
 
 #include "maperror.h"
 
@@ -6448,7 +6449,11 @@
         retVal = 0;
 
 
-        php_header(TSRMLS_C);
+        /* if there is no output buffer active, set the header */ 
+        if (OG(ob_nesting_level)<=0) 
+        { 
+            php_header(TSRMLS_C); 
+        } 
 
         if( MS_DRIVER_GD(im->format) || MS_DRIVER_AGG(im->format))
           iptr = (void *)msSaveImageBuffer(im, &size, im->format);



More information about the mapserver-commits mailing list