The clickbait title is pretty obnoxious. I know that it is the current craze to style that way, but I can't help but imagine that a more helpful title would be something like: "Ruby 2 breaks existing projects by adding Accept-Encoding: gzip"...
This appears to be documented[1] behavior for Ruby.<p>Here's a quote about the header string specifically:<p>"If initheader doesn't have the key 'accept-encoding', then a value of "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" is used, so that gzip compression is used in preference to deflate compression, which is used in preference to no compression. Ruby doesn't have libraries to support the compress (Lempel-Ziv) compression, so that is not supported. The intent of this is to reduce bandwidth by default."<p>I'm not involved in Ruby / Rails development, but it's interesting to note that there was a pull request[2] on the Rails core about enabling gzip compression by default. It was ultimately decided best left up to the webserver and closed with the following quote:<p>"Rails should focus on being an MVC.<p>Enabling Gzip was an idea, but I think we now have enough arguments to not implement it ;)<p>IMO feature closed"<p>This looks like one of those good arguments. From what I can tell, this isn't a Rails problem, but a Ruby problem. I happen to agree that enabling gzip compression is good practice, but I don't think it should default to enabled at the application layer.<p>[1] - <a href="http://ruby-doc.org/stdlib-2.1.0/libdoc/net/http/rdoc/Net/HTTP.html#class-Net::HTTP-label-Compression" rel="nofollow">http://ruby-doc.org/stdlib-2.1.0/libdoc/net/http/rdoc/Net/HT...</a><p>[2] - <a href="https://github.com/rails/rails/pull/7327" rel="nofollow">https://github.com/rails/rails/pull/7327</a>
That seems like an awkward default header, especially if it's not going to deflate it (which causes more issues such as needing the content-length header adjusted and checksums...) It just seems like a bad idea:(
Or if you are actually going to perform an upgrade, consider a move to one of the more mature, stable, secure frameworks under Python, Perl or PHP.<p>Less Rails - less fails. Simple!