From: Martin Duerst Date: 2007-12-28T14:04:00+09:00 Subject: Re: Zlib::Inflate changes to net/http.rb At 12:39 07/12/28, Filipe Lautert wrote: > >Hi, > >from ruby 1.8 to 1.9, NET::HTTP.get method improved a lot, and now it has support to compression, that is really good. > >There is just one small "problem" with content-encoding = deflate (lib/net/http.rb:817): it works as defined by the specification. > >But some browsers/servers have problem with this, as stated in zib site [1]: >'While the HTTP 1.1 RFC 2616 correctly points to the zlib specification in RFC 1950 for the "deflate" transfer encoding, there have been reports of servers and browsers that incorrectly produce or expect raw deflate data per the deflate specficiation in RFC 1951, most notably Microsoft. ' Hello Filipe, The HTTP spec is just now being revised, see http://www.ietf.org/html.charters/httpbis-charter.html. A list of known issues is at http://tools.ietf.org/wg/httpbis/trac/report/11. I suggest you send this issue to the the IETF httpbis WG unless they already know about it. Regards, Martin. >And mongrel too :) And apache mod_deflate default configuration too (2) - those are just some examples. > >mongrel uses raw deflate instead of zlib because it had problems with IE and safari browsers when sendind correct zlib data. And as mongrel, many other guys (apache, for instance) are using raw deflate by default, because it is wrong but "just works". > >The patch that follow change NET::HTTP.get to first try the correct Zlib format. If it fails, then try the raw deflate format: #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp