From: Tobias Reif Date: 2001-10-08T22:12:45+09:00 Subject: [ruby-talk:22236] Re: gzip a string Aristarkh A Zagorodnikov wrote: > Errm ... you'll need a 'Content-Encoding: gzip' (or 'deflate') header I > believe. how exactly would I add Content-Encoding: gzip to print "Content-type: image/svg+xml\n\n" ? > Also, in general case ou should check for 'Accept-Encoding' element in > request header. I'm serving SVG: spec: Appendix G: Conformance Criteria: "SVG implementations which support the HTTP protocol must correctly support gzip-encoded SVG data streams according to the HTTP 1.1 specification [RFC2616]; thus, the client must specify "Accept-Encoding: gzip" [HTTP-ACCEPT-ENCODING] on its request-header field and then decompress any gzip-encoded data streams that are downloaded from the server" ;) Tobi -- Tobias Reif http://www.pinkjuice.com/myDigitalProfile.xhtml go_to('www.ruby-lang.org').get(ruby).play.create.have_fun http://www.pinkjuice.com/ruby/