compression - How to make lighttpd decompress bzip2 files on the fly? -


using lighttpd, want bzip2 of lesser used files on website.

i want lighttpd "automatically" decompress them when requests them.

i don't want send "content-type: application/bzip2" , force client decompress (some clients automatically save bzip2 files instead of displaying them). instead, want send "content-type: text/html" followed uncompressed file contents.

i realize write perl script or use compressed filesystem, i'm hoping simpler solution.

neither "mod_compress" nor "mod_deflate" want. need more "mod_inflate", unfortunately doesn't exist lighttpd.

this isn't answer, long comment. ugly "solution" = in lighttpd.conf host:

  cgi.assign = (".pl" => "/usr/bin/perl",                   ".bz2" => "/usr/local/bin/bc-page-bunzip2.pl")  

(the .pl extension has nothing it, including completeness), , make bc-page-bunzip2.pl program nothing print "content-type: text/html\n\n" followed system("bzcat $argv[0]"):

https://github.com/barrycarter/bcapps/blob/master/bcinfo3/usr/local/bin/bc-page-bunzip2.pl


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -