com web/php: Disable compression, if set by INI, for images: .router.php
| From: | Hannes Magnusson | Date: | Wed, 04 Dec 2013 07:24:04 +0000 |
| Subject: | com web/php: Disable compression, if set by INI, for images: .router.php | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-17335@lists.php.net to get a copy of this message | ||
Commit: d660a766d0b8232f34da93b4893db92e5653ec61
Author: Hannes Magnusson <bjori@mongodb.com> Tue, 3 Dec 2013 23:24:04 -0800
Parents: a11e8ce9bd9d7ed43218358809b74af4ee7dd6b4
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=d660a766d0b8232f34da93b4893db92e5653ec61
Log:
Disable compression, if set by INI, for images
Changed paths:
M .router.php
Diff:
diff --git a/.router.php b/.router.php
index 71e2c6e..b411187 100644
--- a/.router.php
+++ b/.router.php
@@ -8,6 +8,8 @@ $len = strlen($_SERVER["DOCUMENT_ROOT"]);
if (strncmp($_SERVER["DOCUMENT_ROOT"], $afilename, $len) == 0) {
if (file_exists($afilename)) {
+ /* This could be an image or whatever, so don't try to compress it */
+ ini_set("zlib.output_compression", 0);
return false;
}
}