From: "mame (Yusuke Endoh)" Date: 2013-02-15T00:15:23+09:00 Subject: [ruby-core:52257] [ruby-trunk - Bug #7831] Net::HTTP does not allow users to handle Content-Encoding in responses like 1.x Issue #7831 has been updated by mame (Yusuke Endoh). Assignee changed from mame (Yusuke Endoh) to naruse (Yui NARUSE) drbrain (Eric Hodel) wrote: > Committed at r39232 > > mame, may I backport to 2_0_0? The issue that ko1 reported is fixed by #7852, right? It is difficult for me to determine if they should be backported or not, so I leave it up to net/http maintainer. Naruse-san, if you think it is appropriate, could you please backport them to ruby_2_0_0 or ask drbrain to do so? Thanks! -- Yusuke Endoh ---------------------------------------- Bug #7831: Net::HTTP does not allow users to handle Content-Encoding in responses like 1.x https://bugs.ruby-lang.org/issues/7831#change-36284 Author: drbrain (Eric Hodel) Status: Assigned Priority: Normal Assignee: naruse (Yui NARUSE) Category: lib Target version: 2.0.0 ruby -v: - I added a feature to always add a feature to always add Accept-Encoding to HTTP requests and always decode HTTP responses with Content-Encoding. On Ruby 1.9 and older you could handle Content-Encoding for yourself. Now Ruby always handles Content-Encoding for you, but does not give you a good indicator that this has taken place. In mechanize this leads to an incompatibility as the Content-Length header is not updated from the original value. This also disallows handling of bad server responses that browsers handle. The attached patch (upcoming) addresses this by only handling Content-Decoding in a response if the user did not override the Accept-Encoding header. Since this is an incompatibility I would like this fixed for Ruby 2.0. Sorry I did not catch it sooner, I was too busy with RubyGems and RDoc. -- http://bugs.ruby-lang.org/