RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
248 stars 71 forks source link

DEFLATE filter for OTOBO running under Apache/mod_perl/Plack::Handler::Apache2 #1053

Open bschmalhofer opened 3 years ago

bschmalhofer commented 3 years ago

The default Apache configuration scripts/apache2-httpd.include.conf activates deflation.

        <IfModule mod_filter.c>
            <IfModule mod_deflate.c>
                AddOutputFilterByType DEFLATE text/html text/javascript application/javascript text/css text/xml application/json text/json
            </IfModule>
        </IfModule>

Maybe adding deflation to otobo.psgi is a good idea too. This could be done by adding the middleware https://metacpan.org/pod/Plack::Middleware::Deflater . Are there any downsides to using the middleware?

bschmalhofer commented 3 years ago

The app https://metacpan.org/pod/Plack::App::MCCS and the middleware https://metacpan.org/pod/Plack::Middleware::MCCS look nice too.

bschmalhofer commented 3 years ago

Testing for #1032 showed an issue for Plack::Middleware::Deflater. There was a complaint about wide characters from Compress::Raw::Zlib::crc32. We need to think some more about deflating content.

bschmalhofer commented 3 years ago

My conclusion is that activating DEFLATE is neither the responsibility of otobo.psgi nor of zzz_otobo.conf. In the Apache case we have mods-enabled/deflate.conf . Or DEFLATE could be handled by nginx. For Gazelle there should also be a solution that is nicer than adding Plack::Middleware::Deflate to otobo.psgi.

TODO:

bschmalhofer commented 3 years ago

DEFLATE under Gazelle is a separate issue. Let's open a new issue for that. The goal is that zipping the content should be possible without fiddling with otobo.psgi.