aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2018-01-30 18:21:07 -0500
committerGeorge Claghorn <george@basecamp.com>2018-01-30 18:21:07 -0500
commit54bb2f74b5156b4251582842b0edc8e216958e01 (patch)
tree9a7ae9d42b9de1c7b93f346a0631d67e63296240
parentcdffab4bc7f9f6d0a46cbd31beed6b4b6dc4855a (diff)
downloadrails-54bb2f74b5156b4251582842b0edc8e216958e01.tar.gz
rails-54bb2f74b5156b4251582842b0edc8e216958e01.tar.bz2
rails-54bb2f74b5156b4251582842b0edc8e216958e01.zip
Add Rack::TempfileReaper to tests and docs
-rw-r--r--guides/source/rails_on_rack.md5
-rw-r--r--railties/test/application/middleware_test.rb6
2 files changed, 9 insertions, 2 deletions
diff --git a/guides/source/rails_on_rack.md b/guides/source/rails_on_rack.md
index 6780e7c0de..1627205b7b 100644
--- a/guides/source/rails_on_rack.md
+++ b/guides/source/rails_on_rack.md
@@ -126,6 +126,7 @@ use ActionDispatch::ContentSecurityPolicy::Middleware
use Rack::Head
use Rack::ConditionalGet
use Rack::ETag
+use Rack::TempfileReaper
run MyApp::Application.routes
```
@@ -300,6 +301,10 @@ Much of Action Controller's functionality is implemented as Middlewares. The fol
* Adds ETag header on all String bodies. ETags are used to validate cache.
+**`Rack::TempfileReaper`**
+
+* Cleans up tempfiles used to buffer multipart requests.
+
TIP: It's possible to use any of the above middlewares in your custom Rack stack.
Resources
diff --git a/railties/test/application/middleware_test.rb b/railties/test/application/middleware_test.rb
index d59384e982..b9e4a9ccc0 100644
--- a/railties/test/application/middleware_test.rb
+++ b/railties/test/application/middleware_test.rb
@@ -45,7 +45,8 @@ module ApplicationTests
"ActionDispatch::ContentSecurityPolicy::Middleware",
"Rack::Head",
"Rack::ConditionalGet",
- "Rack::ETag"
+ "Rack::ETag",
+ "Rack::TempfileReaper"
], middleware
end
@@ -69,7 +70,8 @@ module ApplicationTests
"ActionDispatch::Callbacks",
"Rack::Head",
"Rack::ConditionalGet",
- "Rack::ETag"
+ "Rack::ETag",
+ "Rack::TempfileReaper"
], middleware
end