From: Brian Candler Date: 2003-05-16T23:02:48+09:00 Subject: Re: gzip cgi compression On Fri, May 16, 2003 at 10:40:00PM +0900, Dominik Werder wrote: > > How are you running this? As a CGI under a webserver, or is there a Ruby > > TCP > > server which is not shown? > I'm running it with mod_ruby Ah, that's not something I use. But I can trade you a working CGI: #!/usr/local/bin/ruby -w data = IO.popen("cat /etc/motd | gzip -c","r").read puts "Content-Type: text/plain" puts "Content-Encoding: gzip" puts print data This works fine for me; at least Mozilla and Lynx both display the uncompressed data. Maybe you can use this as a starting point to work out how to do the same thing under mod_ruby. Cheers, Brian.