From 707144a31e19a3d6c1cb237d4cb74cefa0124296 Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Tue, 23 Jun 2015 16:59:30 +0200 Subject: Remove the paragraph about Rails::Server#middleware As of 56903585, the Rack::ContentLength middleware isn't included by default anymore. The only remaining middleware is Rack::Lock ; since it's only included when using WEBrick, it's certainly not worth documenting it in the guides. [ci skip] --- guides/source/rails_on_rack.md | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md index 99ab47d1db..1e2fe94010 100644 --- a/guides/source/rails_on_rack.md +++ b/guides/source/rails_on_rack.md @@ -58,22 +58,6 @@ class Server < ::Rack::Server end ``` -Here's how it loads the middlewares: - -```ruby -def middleware - middlewares = [] - middlewares << [::Rack::ContentLength] - Hash.new(middlewares) -end -``` - -The following table explains the usage of the loaded middlewares: - -| Middleware | Purpose | -| ----------------------- | --------------------------------------------------------------------------------- | -| `Rack::ContentLength` | Counts the number of bytes in the response and set the HTTP Content-Length header | - ### `rackup` To use `rackup` instead of Rails' `rails server`, you can put the following inside `config.ru` of your Rails application's root directory: @@ -81,8 +65,6 @@ To use `rackup` instead of Rails' `rails server`, you can put the following insi ```ruby # Rails.root/config.ru require ::File.expand_path('../config/environment', __FILE__) - -use Rack::ContentLength run Rails.application ``` -- cgit v1.2.3