Commit Graph

45 Commits

Author SHA1 Message Date
José Valim
6e5eedeb12 Move content length to the server, this brings the same behavior as in rack 1.2. 2011-05-23 10:28:00 +02:00
José Valim
5eadb4d73d Temporarily ship with ContentLength middleware. 2011-05-20 22:20:51 +02:00
José Valim
e4ebded5bc Use Rack::ContentLength. 2011-05-19 12:35:07 -04:00
David Lee
828f171536 Fix tests to reflect IdentityMap no longer default
Broke in 0e1dcae1857db4f6721561caff38d8be748d0b40
2011-05-10 19:21:32 -07:00
David Lee
17a91a6ef9 Logs should show overridden method; Issue 426 2011-05-07 03:04:26 -07:00
Xavier Noria
84aab7aa53 s/with/when/ 2011-03-27 22:31:42 +02:00
Prem Sichanugrist
2c0c4d754e Add config.force_ssl configuration which will load Rack::SSL middleware if set to true
This will allow user to be able to force all requests to be under HTTPS protocol.

This commit was a request from DHH. Special thanks to Josh Peek as well for making `Rack::SSL`.
2011-03-27 13:27:23 -07:00
Prem Sichanugrist
515ea955b6 Always use ActionDispatch::ShowExceptions middleware [#6462 state:resolved]
This will make sure the application will raise `ActionController::RoutingError` in case "X-Cascade: pass" header was set, usually when there's no route match.
2011-02-25 10:03:53 -08:00
Emilio Tagua
18439e28e0 We really don't care about IM middleware order, the important is that it gets included. 2011-02-18 14:57:29 -08:00
Emilio Tagua
02fc6fbccd Merge remote branch 'rails/master' into identity_map
Conflicts:
	activerecord/lib/active_record/associations/association_proxy.rb
	activerecord/lib/active_record/autosave_association.rb
	activerecord/lib/active_record/base.rb
	activerecord/lib/active_record/persistence.rb
2010-12-20 11:23:07 -03:00
John Firebaugh
0f7c970e4f Introduce ActionDispatch::Reloader
Based on the implementation on the 2-3-stable branch, patches by Hongli
Lai <hongli@phusion.nl>, and helpful suggestions from José Valim.

Hongli Lai's patches included locking around the request cycle; this is
now handled by Rack::Lock (https://github.com/rack/rack/issues/issue/87/).

[#2873]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-12-20 12:43:02 +01:00
Emilio Tagua
69b627ef67 Don't load IdentityMap middleware if not enabled. Simplify middleware. 2010-11-19 19:08:56 -03:00
Emilio Tagua
f3722a30b6 Use IdentityMap middleware to flush map on each request. 2010-11-19 19:08:42 -03:00
José Valim
74dd8a3681 Move ETag and ConditionalGet logic from AD::Response to the middleware stack. 2010-10-03 21:25:22 +02:00
José Valim
609849a0f1 Fix a routing test. Reorganize middleware tests. 2010-10-02 17:42:36 +02:00
Sparky
eeb3246991 Only add Rack::Cache to the middleware stack if config.action_controller.perform_caching is set. 2010-09-15 12:58:49 -07:00
wycats
254ab7d916 First pass at Rack::Cache 2010-09-13 16:06:03 -07:00
Jeremy Kemper
c211d904ba Revert "Just add connection management middleware if running in a concurrent environment."
This reverts commit 6b29dc876fe185881d46731c3ae170478a3828fe.
2010-08-20 18:55:02 -07:00
wycats
eff074951e Fix middleware test 2010-07-27 21:10:30 -07:00
Xavier Noria
92669b8320 application generation: --skip-testunit and --skip-activerecord renamed to --skip-test-unit and --skip-active-record respectively
Reason is their proper spellings are "Test::Unit" and "Active Record".
Option names and descriptions have been revised, as well as some method
names and minor details here and there.
2010-07-25 22:55:38 +02:00
José Valim
6b29dc876f Just add connection management middleware if running in a concurrent environment. 2010-07-12 20:18:54 +02:00
Neeraj Singh
81c5684267 adding middleware test for RAILS_CACHE
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-24 20:08:50 +02:00
José Valim
211799450d Ensure show exceptions middleware properly filters backtrace before logging. 2010-06-09 22:49:14 +02:00
José Valim
a210aff210 Add delete to middleware stack proxy. 2010-06-07 23:17:23 +02:00
José Valim
19d8c8cbe4 Remove the laziness from the middleware stack. 2010-05-29 22:29:46 +02:00
wycats
45e60283e7 Removing Metal from Rails 3.
If you have existing Metals, you have a few options:
* if your metal behaves like a middleware, add it to the
  middleware stack via config.middleware.use. You can use
  methods on the middleware stack to control exactly where
  it should go
* if it behaves like a Rack endpoint, you can link to it
  in the router. This will result in more optimal routing
  time, and allows you to remove code in your endpoint
  that matches specific URLs in favor of the more powerful
  handling in the router itself.

For the future, you can use ActionController::Metal to get
a very fast controller with the ability to opt-in to specific
controller features without paying the penalty of the full
controller stack.

Since Rails 3 is closer to Rack, the Metal abstraction is
no longer needed.
2010-05-29 20:08:00 +02:00
José Valim
25f7c030e4 Simplify cookie_store by simply relying on cookies.signed. 2010-05-18 02:05:20 +02:00
José Valim
3dfcb56e45 ActiveRecord middlewares should be inserted before AD::Cascade [#4493 state:resolved]. 2010-04-29 13:24:35 +02:00
José Valim
1b816d5024 The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks. 2010-04-29 08:39:52 +02:00
José Valim
c9132c149c Refactor tests by moving all middleware tests to the same place. 2010-04-26 09:04:04 +02:00
José Valim
997e22c275 Add a test which ensures action_dispatch.show_exceptions is properly disabled. 2010-04-02 20:54:10 +02:00
Carl Lerche
15b3b74624 Fix all the broken tests due to the AC configuration refactor 2010-03-03 21:24:27 -08:00
Carlhuda
47498a7f59 Woops, forgot to actually add active_support/core_ext/file/path.rb 2010-02-23 17:42:26 -08:00
José Valim
0dece7929c Deprecate AC configuration values which were moved to Rack. 2010-02-01 11:40:27 +01:00
José Valim
edb8131535 Move Rails::Rack::Metal to Rails::Application::Metal and just add cascade if any metal was declared. 2010-01-26 15:27:46 +01:00
Joshua Peek
2db14457f4 Delegate App calls to instance 2010-01-22 13:56:10 -06:00
José Valim
378464a2e4 Default to sync instrumentation. 2010-01-21 13:09:12 +01:00
José Valim
8f5e733998 Add notifications to default middleware stack and update subscriber tests. 2010-01-17 11:35:48 +01:00
Joshua Peek
d2d4acf027 Cookies middleware 2010-01-16 17:22:27 -06:00
Joshua Peek
ead93c5be5 Move Flash into middleware 2010-01-15 14:55:13 -06:00
Joshua Peek
3eaf525213 Make HEAD method masquerade as GET so requests are routed correctly 2010-01-15 12:38:50 -06:00
Joshua Peek
02bbde4e78 Cleanup junk metal and revise API
API Change: Returning a "X-Cascade: pass" header triggers the cascade
instead of a 404 response.
2010-01-10 23:09:10 -06:00
Joshua Peek
3f28e0bda6 Trash string coercion rack hacks 2010-01-04 19:46:21 -06:00
Joshua Peek
76b5f18feb Default middleware stack needs to be available at configuration time 2010-01-04 19:40:16 -06:00
Joshua Peek
56b28ec8d6 Middleware configuration tests 2010-01-04 19:40:16 -06:00