Re: [RFC/PATCH] gitweb: Enable transparent compression form HTTP output
From: Jakub Narebski <hidden>
Date: 2016-06-15 22:43:30
On Sat, Aug 25, 2007, Petr Baudis wrote:
On Wed, Jul 25, 2007 at 08:39:43PM CEST, Jakub Narebski wrote:
quoted
Check if PerlIO::gzip is available, and if it is make it possible toIt doesn't really check if the require succeeded. Either the description or (preferrably, but not a showstopper, IMO) the code should be adjusted.
It does not check if require succeeded (I could do that this way), but instead checks if $PerlIO::gzip::VERSION is defined (if it is true). our $enable_transparent_compression = !! $PerlIO::gzip::VERSION;
quoted
enable (via 'compression' %feature) transparent compression of HTML output. Error messages and any non-HTML output are excluded from transparent compression. Signed-off-by: Jakub Narebski <redacted>Acked-by: Petr Baudis <redacted>
By the way, this was more "proof of concept" than solution of an itch.
I'd put it on repo.or.cz... too bad that there I value CPU much more than the bandwidth. ;-) Why did you exclude non-HTML output from transparent compression? Me and I guess other people too sometimes download rather large chunks of raw data over gitweb.
Because it was easiest. We have single point of entry for HTML output (the git_header_html subroutine), but we don't have anything similar for non-HTML output. And we most certainly wouldn't want to enable transparent compression for snapshots and 'blob_plain' view for compressed files, including png, gif, jpeg, zip, mp3, ogg,... -- Jakub Narebski Poland