Do Not Upgrade Your Rails Project to Ruby 2 Before You Read This
avi.io
avi.io
This is textbook clickbait. Yawn.
Here's a quote about the header string specifically:
"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."
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:
"Rails should focus on being an MVC.
Enabling Gzip was an idea, but I think we now have enough arguments to not implement it ;)
IMO feature closed"
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.
[1] - http://ruby-doc.org/stdlib-2.1.0/libdoc/net/http/rdoc/Net/HT...
Other than including the words 'gzip compression' the two topics are very different.
1. default request header on by default 2. support for deflation off by default
WAT?
Less Rails - less fails. Simple!
good one.