aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
* Use Rails.application where we want a valid rack appJoshua Peek2009-10-161-1/+1
|
* Make IntegrationTest::Runner propagate method_missing to ancestors.George Ogata2009-10-151-2/+6
| | | | | | | Fixes RSpec integration example groups, which mixes its Matchers module into ActiveSupport::TestCase. Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Callbacks, DeprecatedCallbacks = NewCallbacks, CallbacksJoshua Peek2009-10-121-1/+1
|
* Use "run_callbacks :foo" since it is the public api for callbacks [#3329Joshua Peek2009-10-121-3/+3
| | | | state:resolved]
* Avoid super in define_method for RubiniusYehuda Katz2009-10-091-1/+6
|
* Coerce all out going body parts to StringsJoshua Peek2009-10-051-0/+29
|
* Initialize a new instance of Rails.application during integration testsCarl Lerche2009-09-301-1/+1
| | | This is to fix the AWDWR tests until the application object is refactored to be a singleton.
* Move middleware and route configuration from AC::Dispatcher to Rails ↵Joshua Peek2009-09-261-2/+3
| | | | application object
* Allow setting a default application for all integration testsJoshua Peek2009-09-261-2/+20
|
* Allow integration test rack app to be set with "@app" ivar instead of using ↵Joshua Peek2009-09-261-2/+3
| | | | open_session
* Move Rails::Static into ActionDispatchJoshua Peek2009-09-261-0/+44
|
* Extract "parse_config" into ADJoshua Peek2009-09-251-0/+20
|
* Fix generic url rewriter in integration testsJoshua Peek2009-09-251-1/+1
|
* SessionRestoreError belongs in ADJoshua Peek2009-09-233-9/+12
|
* Move integration test runner into ActionDispatchJoshua Peek2009-09-232-0/+495
|
* Fixes Sam Ruby tests suite.José Valim2009-09-211-6/+1
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Use NewCallbacks on ActionDispatch::Callbacks.José Valim2009-09-201-23/+38
|
* 1.9 fix for changes to #to_s. By Sam Ruby. [#3228 state:resolved]Yehuda Katz2009-09-181-2/+2
|
* Beef up AD::Rescue to replace global exception handling lost in ↵Joshua Peek2009-09-151-4/+16
| | | | ApplicationController
* Lazy require memcache for session middlewareJoshua Peek2009-09-131-40/+35
|
* CookieStore should not be derived from Hash - reverting [#2268 state:resolved]Jay Pignata2009-09-031-1/+1
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* If session_options[:id] is requested when using CookieStore, unmarshal the ↵Jay Pignata2009-09-031-3/+14
| | | | | | session to access it [#2268 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* rack-test 0.4.2 has rack 1.1.pre goodies, we'll use it insteadJoshua Peek2009-08-311-297/+2
|
* Back off rack 1.1-pre and bundle in the new testing goodiesJoshua Peek2009-08-3152-5414/+297
|
* Switch over to rack-test gemJoshua Peek2009-08-317-641/+0
|
* SessionHash#update and SessionHash#delete are missing a call to load! [#3056 ↵Joshua Peek2009-08-311-0/+2
| | | | state:resolved]
* Require necessary active_support files in cookie storeCarl Lerche2009-08-261-0/+2
|
* Rework Middleware stack to match the Rack middleware protocol more closelyYehuda Katz + Carl Lerche2009-08-251-3/+3
|
* ActionController::Metal can be a middlewareYehuda Katz + Carl Lerche2009-08-251-1/+4
|
* Move legacy param_parsers config onto AD::ParamsParserJoshua Peek2009-08-211-5/+7
|
* Adding a call to logger from params_parser to give detailed debug ↵Jay Pignata2009-08-151-0/+6
| | | | | | | | information when invalid xml or json is posted [#2481 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-24/+12
| | | | | | | | | | | | | | | | * request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
* More perf work:Yehuda Katz2009-08-112-58/+63
| | | | | | | | | | | | | | * Move #set_cookie and #delete_cookie inline to optimize. These optimizations should almost certainly be sent back upstream to Rack. The optimization involves using an ivar for cookies instead of indexing into the headers each time. * Was able to use a bare Hash for headers now that cookies have their own joining semantics (some code assumed that the raw cookies were an Array). * Cache blankness of body on body= * Improve expand_cache_key for Arrays of a single element (common in our case) * Use a simple layout condition check unless conditions are used * Cache visible actions * Lazily load the UrlRewriter * Make etag an ivar that is set on prepare!
* Got overhead down from 127 to 85. All tests pass:Yehuda Katz2009-08-111-36/+56
| | | | | | | | | | | | | | | | | | | | | | | | | * Tentatively replaced HeaderHash with SimpleHeaderHash, which does not preserve case but does handle converting Arrays to Strings in to_hash. This requires further discussion. * Moved default_charset to ActionDispatch::Response to avoid having to hop over to ActionController. Ideally, this would be a constant on AD::Response, but some tests expect to be able to change it dynamically and I didn't want to change them yet. * Completely override #initialize from Rack::Response. Previously, it was creating a HeaderHash, and then we were creating an entirely new one. There is no way to call super without incurring the overhead of creating a HeaderHash. * Override #write from Rack::Response. Its implementation tracks Content-Length, and doing so adds additional overhead that could be mooted if other middleware changes the body. It is more efficiently done at the top-level server. * Change sending_file to an instance_variable instead of header inspection. In general, if a state is important, it should be set as a property of the response not reconstructed later. * Set the Etag to @body instead of .body. AS::Cache.expand_cache_key handles Arrays fine, and it's more efficient to let it handle the body parts, since it is not forced to create a joined String. * If we detect the default cache control case, just set it, rather than setting the constituent parts and then running the normal (expensive) code to generate the string.
* This change causes some failing tests, but it should be possible to make ↵Yehuda Katz2009-08-111-11/+12
| | | | them pass with minimal performance impact.
* Allow to configure trusted proxies via ↵Felipe Talavera2009-08-091-2/+2
| | | | | | ActionController::Base.trusted_proxies [#2126 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Add :redirect to the testable RJS statements [#2612 state:resolved]Jon Wood2009-08-091-3/+10
| | | | | | | Example : assert_select_rjs :redirect, root_path Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove legacy processing and content_lengthYehuda Katz2009-08-021-40/+10
| | | | | | | | | | | * convert_content_type! is handled by assign_default_content_type_and_charset! * set_content_length! should be handled by the endpoint server. Otherwise each middleware that modifies the body has to do the expensive work of recalculating content_length. * convert_language! appears to be legacy. There are no tests for this * convert_cookies! should be handled by the new HeaderHash in Rack * Use an integer for .status's internal representation to avoid needing to do String manipulation just to find out the status
* Update cache_control to be a Hash of options that is used to build the header.Yehuda Katz2009-08-021-5/+19
| | | | * Significantly simplifies setting and modifying cache control in other areas
* Remove last TODO.José Valim2009-07-291-1/+1
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Remove Mime::ALL from Mime::SET.José Valim2009-07-291-2/+4
| | | | Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Refactor even more Responder. Move mime negotiation to request and added ↵José Valim2009-07-291-8/+34
| | | | | | respond_to class method. Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Small changes to get 1.9 passing (for the most part)Yehuda Katz2009-06-231-1/+1
|
* Fixing pending tests and fixed some formats / partial rendering semanticsYehuda Katz + Carl Lerche2009-06-172-7/+17
|
* Finish making things pass with updated internal content_type semanticsYehuda Katz + Carl Lerche2009-06-151-45/+11
|
* ActionPack components should no longer have undeclared dependencies.Yehuda Katz + Carl Lerche2009-06-082-0/+3
| | | | | | | * Tests can be run in isolation * Dependencies added * A few tests modified to avoid depending on AS deps not depended on my files they were testing
* Depend on Hash#diff extensionJeremy Kemper2009-05-301-0/+2
|
* Revert "Only save the session if we're actually writing to it [#2703 ↵Joshua Peek2009-05-301-10/+1
| | | | | | state:resolved]" This reverts commit dd98280e38d640f5724887cf8a715b79f0439d2d.
* Only save the session if we're actually writing to it [#2703 state:resolved]Johan Sörensen2009-05-281-1/+10
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Make the default 500 Internal Server Error page more friendly. Many people ↵Hongli Lai (Phusion)2009-05-271-1/+4
| | | | | | don't know they're supposed to look in the log files. [#2716 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>