diff options
Diffstat (limited to 'net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch')
-rw-r--r-- | net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch b/net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch deleted file mode 100644 index d79a07c..0000000 --- a/net-analyzer/icinga-web/files/icinga-web-1.7.1-disable-compression.patch +++ /dev/null @@ -1,70 +0,0 @@ ---- app/modules/AppKit/config/module.xml.in -+++ app/modules/AppKit/config/module.xml.in -@@ -29,6 +29,8 @@ - <setting name="squishloader"> - <ae:parameter name="cache_dir">%core.cache_dir%/Squished</ae:parameter> - <ae:parameter name="use_caching">@flag_caching@</ae:parameter> -+ <ae:parameter name="use_gzcompress">false</ae:parameter> -+ <ae:parameter name="gzcompress_level">2</ae:parameter> - </setting> - - <setting name="user_preferences_default"> ---- app/modules/AppKit/validate/Widgets/SquishLoader.xml -+++ app/modules/AppKit/validate/Widgets/SquishLoader.xml -@@ -5,12 +5,18 @@ - parent="%core.module_dir%/AppKit/config/validators.xml" - > - <ae:configuration> -- - <validators> - <validator class="string" name="IfNoneMatch" source="headers" required="false"> - <argument>IF_NONE_MATCH</argument> - </validator> -- -+ -+ <validator class="string" name="accept_encoding" source="headers" required="true"> -+ <argument>ACCEPT_ENCODING</argument> -+ -+ <errors> -+ <error>Could not validate HTTP_REFERER</error> -+ </errors> -+ </validator> - </validators> - </ae:configuration> - </ae:configurations> ---- app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php -+++ app/modules/AppKit/views/Widgets/SquishLoaderSuccessView.class.php -@@ -45,8 +45,31 @@ class AppKit_Widgets_SquishLoaderSuccessView extends AppKitBaseView { - return ""; - } - -- ob_start("ob_gzhandler"); -- -+ $options = AgaviConfig::get('modules.appkit.squishloader', array()); -+ $gz_level = isset($options['gzcompress_level']) ? -+ (integer)$options['gzcompress_level'] : 3; -+ $gz_use = isset($options['use_gzcompress']) ? -+ (boolean)$options['use_gzcompress'] : false; -+ -+ if ($gz_use === true) { -+ -+ $encoding = $rd->getHeader('ACCEPT_ENCODING', false); -+ -+ if (strpos($encoding, 'gzip') !== false) { -+ $encoding = 'gzip'; -+ } elseif(strpos($encoding, 'x-gzip') !== false) { -+ $encoding = 'x-gzip'; -+ } -+ -+ if ($encoding !== false) { -+ header('Content-Encoding: '. $encoding); -+ $l = strlen($content);
-+ $content = gzcompress($content, 4);
-+ $content = substr($content, 0, $l); -+ return "\x1f\x8b\x08\x00\x00\x00\x00\x00". $content; -+ } -+ } -+ - return $content; - } - } |