jani Mon, 17 Aug 2009 16:54:39 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287422
Log:
- Try disabling zlib.output_compression always for images. (zlib extension
might be compiled as shared and not same time as the main PHP binary)
Changed paths:
U php/php-src/branches/PHP_5_2/main/SAPI.c
U php/php-src/branches/PHP_5_3/main/SAPI.c
U php/php-src/trunk/main/SAPI.c
Modified: php/php-src/branches/PHP_5_2/main/SAPI.c
===================================================================
--- php/php-src/branches/PHP_5_2/main/SAPI.c 2009-08-17 15:54:51 UTC (rev
287421)
+++ php/php-src/branches/PHP_5_2/main/SAPI.c 2009-08-17 16:54:39 UTC (rev
287422)
@@ -610,11 +610,12 @@
ptr++;
len--;
}
-#if HAVE_ZLIB
- if(!strncmp(ptr, "image/", sizeof("image/")-1))
{
+
+ /* Disable possible output compression for
images */
+ if (!strncmp(ptr, "image/",
sizeof("image/")-1)) {
zend_alter_ini_entry("zlib.output_compression",
sizeof("zlib.output_compression"), "0", sizeof("0") - 1, PHP_INI_USER,
PHP_INI_STAGE_RUNTIME);
}
-#endif
+
mimetype = estrdup(ptr);
newlen = sapi_apply_default_charset(&mimetype,
len TSRMLS_CC);
if (!SG(sapi_headers).mimetype){
Modified: php/php-src/branches/PHP_5_3/main/SAPI.c
===================================================================
--- php/php-src/branches/PHP_5_3/main/SAPI.c 2009-08-17 15:54:51 UTC (rev
287421)
+++ php/php-src/branches/PHP_5_3/main/SAPI.c 2009-08-17 16:54:39 UTC (rev
287422)
@@ -637,11 +637,12 @@
ptr++;
len--;
}
-#if HAVE_ZLIB
- if(!strncmp(ptr, "image/", sizeof("image/")-1))
{
+
+ /* Disable possible output compression for
images */
+ if (!strncmp(ptr, "image/",
sizeof("image/")-1)) {
zend_alter_ini_entry("zlib.output_compression",
sizeof("zlib.output_compression"), "0", sizeof("0") - 1, PHP_INI_USER,
PHP_INI_STAGE_RUNTIME);
}
-#endif
+
mimetype = estrdup(ptr);
newlen = sapi_apply_default_charset(&mimetype,
len TSRMLS_CC);
if (!SG(sapi_headers).mimetype){
Modified: php/php-src/trunk/main/SAPI.c
===================================================================
--- php/php-src/trunk/main/SAPI.c 2009-08-17 15:54:51 UTC (rev 287421)
+++ php/php-src/trunk/main/SAPI.c 2009-08-17 16:54:39 UTC (rev 287422)
@@ -29,9 +29,6 @@
#include "php_ini.h"
#include "ext/standard/php_string.h"
#include "ext/standard/pageinfo.h"
-#if HAVE_ZLIB
-#include "ext/zlib/php_zlib.h"
-#endif
#ifdef ZTS
#include "TSRM.h"
#endif
@@ -657,11 +654,12 @@
ptr++;
len--;
}
-#if HAVE_ZLIB
+
+ /* Disable possible output compression for
images */
if (!strncmp(ptr, "image/",
sizeof("image/")-1)) {
zend_alter_ini_entry("zlib.output_compression",
sizeof("zlib.output_compression"), "0", sizeof("0") - 1, PHP_INI_USER,
PHP_INI_STAGE_RUNTIME);
}
-#endif
+
mimetype = estrdup(ptr);
newlen = sapi_apply_default_charset(&mimetype,
len TSRMLS_CC);
if (!SG(sapi_headers).mimetype){
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php