WEBrick uses for creating listeners Socket.tcp_server_sockets. If tcp_server_sockets is given host: nil, it opens socket on [::] address (IPv6 if available) and while on 0.0.0.0 (if IPv4 if available). See documentation: http://docs.ruby-lang.org/en/2.2.0/Socket.html#method-c-tcp_server_socke ts
This makes it simple to served static files that have already been gzipped. This is significantly faster than using Rack::Deflater to serve the same files, as it results in less IO and it avoids the need to gzip at runtime. This provides a similar feature to nginx's gzip_static directive.
also make the gemspec version based off the RELEASE version set in rack.rb so that they don't get out of sync
…zen env. Ref rack/rack#848
Currently, files with underscores are not loaded using standard ruby/rails conventions b/c of the way Object.const_get is called inside Rack::Builder.parse_file. For example, a filename 'my_example_app', will be required and then an Object.const_get('My_example_app') call will throw a NameError unless you have named your class accordingly inside the my_example_app file. This commit changes the behavior so that 'my_example_app' is required and then Object.const_get('MyExampleApp') is called. I think this is the behavior most developers would expect.
Setting the output buffer size to 5 means that we will do thousands of small writes when serving a large file, which is inefficient. This fix improves performance of the HTTP server. This resolves the slow-down referenced at rails/rails#18828