From: Tim Düsterhus Date: Wed, 17 Dec 2014 22:04:45 +0000 (+0100) Subject: Remove HTTP_GZIP_LEVEL option X-Git-Tag: 2.1.0_Beta_2~16 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=961ca344df91da948c8c893487024a9859b23f4b;p=GitHub%2FWoltLab%2FWCF.git Remove HTTP_GZIP_LEVEL option --- diff --git a/com.woltlab.wcf/option.xml b/com.woltlab.wcf/option.xml index 2e0c164ab2..014bc314c8 100644 --- a/com.woltlab.wcf/option.xml +++ b/com.woltlab.wcf/option.xml @@ -505,13 +505,6 @@ imagick:wcf.acp.option.image_adapter_type.imagick]]> 1 - @@ -1403,5 +1396,6 @@ DESC:wcf.global.sortOrder.descending]]> diff --git a/wcfsetup/install/files/lib/util/HeaderUtil.class.php b/wcfsetup/install/files/lib/util/HeaderUtil.class.php index 404fe5d753..ba5a0be788 100644 --- a/wcfsetup/install/files/lib/util/HeaderUtil.class.php +++ b/wcfsetup/install/files/lib/util/HeaderUtil.class.php @@ -16,6 +16,12 @@ use wcf\system\WCF; * @category Community Framework */ final class HeaderUtil { + /** + * gzip level to user + * @var integer + */ + const GZIP_LEVEL = 1; + /** * gzip compression * @var boolean @@ -54,7 +60,7 @@ final class HeaderUtil { @header('Cache-Control: no-store'); } - if (HTTP_ENABLE_GZIP && HTTP_GZIP_LEVEL > 0 && HTTP_GZIP_LEVEL < 10 && !defined('HTTP_DISABLE_GZIP')) { + if (HTTP_ENABLE_GZIP && !defined('HTTP_DISABLE_GZIP')) { if (function_exists('gzcompress') && !@ini_get('zlib.output_compression') && !@ini_get('output_handler') && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { self::$enableGzipCompression = true; @@ -122,7 +128,7 @@ final class HeaderUtil { $crc = crc32(self::$output); $newOutput = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff"; - $newOutput .= substr(gzcompress(self::$output, HTTP_GZIP_LEVEL), 2, -4); + $newOutput .= substr(gzcompress(self::$output, self::GZIP_LEVEL), 2, -4); $newOutput .= pack('V', $crc); $newOutput .= pack('V', $size); diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index fbcc1c84f6..c69ee9bda3 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -744,8 +744,6 @@ - - getPath()}acp/dereferrer.php?url={'http://de.wikipedia.org/wiki/Clickjacking'|rawurlencode}" class="externalURL">„X-Frame-Options“ Header um die Einbettung dieser Seite in einem Frame zu verhindern (sendet „SAMEORIGIN“).]]> diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index b8e6ed6c41..07c1d0cd5c 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -743,8 +743,6 @@ Examples for medium ID detection: - - getPath()}acp/dereferrer.php?url={'http://en.wikipedia.org/wiki/Clickjacking'|rawurlencode}" class="externalURL">“X-Frame-Options” header to prevent 3rd party sites from embedding this site in a frame (sends “SAMEORIGIN”).]]>