From: Dominik Werder Date: 2003-05-16T22:10:02+09:00 Subject: gzip cgi compression Is zlib compatible with HTTP-gzip-output-compression? I tried the following short code and I get a really good looking response, but all browsers display only the compressed data. It seems, that they don't unzip ? --- SNIP --- data=< test EOF require 'zlib' zipped = Zlib::Deflate.deflate data, 9 puts 'HTTP/1.1 200 OK' puts 'Server: Ruby' puts 'Content-Encoding: gzip' puts 'Vary: Accept-Encoding' puts 'Transfer-Encoding: chunked' puts 'Content-Type: text/html' puts print zipped.length.to_s(16) print "\r\n" print zipped print "\r\n" print "0" print "\r\n\r\n" --- SNIP ---