aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
Commit message (Collapse)AuthorAgeFilesLines
* Deprecate RAILS_ROOT in favor of Rails.root (which proxies to the ↵Carl Lerche2009-10-161-1/+1
| | | | application's object root)
* Unify benchmark APIs.José Valim2009-10-151-21/+2
|
* Use ERB::Util.h over CGI.escapeHTML as the former is safety aware and the ↵Michael Koziarski2009-10-151-1/+1
| | | | latter isn't
* CookieJar#delete should return the key's value, consistent with a HashJeffrey Hardy2009-10-141-1/+2
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Finish porting over the initializers to the app object and fix all the testsCarl Lerche2009-10-081-1/+1
|
* Resurrect AC::Benchmarking [#3140 state:resolved]Joshua Peek2009-09-241-0/+92
|
* SessionRestoreError belongs in ADJoshua Peek2009-09-231-3/+0
|
* Remove global exception catching from ApplicationController.Joshua Peek2009-09-151-42/+3
| | | It was severely broken since it was ported to NewBase and is causing problems with normal exception catching. A replacement is coming soon.
* Fix filtering parameters when there are Fixnum or other un-dupable values.Nathaniel Talbott2009-09-101-1/+1
| | | | | | [#3184 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Ensure that blocks are also handled inside the responder.José Valim2009-08-292-23/+36
|
* Attempt to render the template inside the responder, so it can be used for ↵José Valim2009-08-292-26/+37
| | | | | | caching and pagination. Signed-off-by: Yehuda Katz <wycats@gmail.com>
* And the same thing for BasicYehuda Katz + Carl Lerche2009-08-251-1/+2
|
* HTTP Auth should not depend on RenderingControllerYehuda Katz + Carl Lerche2009-08-251-1/+2
|
* Redirector had an undeclared dependency on Logger.Yehuda Katz + Carl Lerche2009-08-251-0/+3
|
* Modify Digest and Basic to take a request so they can be used outside of the ↵Yehuda Katz + Carl Lerche2009-08-251-7/+7
| | | | controller
* ActionController::Metal can be a middlewareYehuda Katz + Carl Lerche2009-08-251-7/+1
|
* Move legacy param_parsers config onto AD::ParamsParserJoshua Peek2009-08-211-6/+0
|
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-7/+15
| | | | | | | | | | | | | | | | * 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".
* Caches and cache clearing seems to actually work, but the actual ↵Yehuda Katz2009-08-151-0/+32
| | | | architecture is kind of messy. Next: CLEAN UP.
* Merge branch 'master' of git://github.com/rails/railsJosé Valim2009-08-134-17/+22
|\
| * More perf work:Yehuda Katz2009-08-113-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-112-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Ensure collections are not treated as nested resources.José Valim2009-08-132-7/+8
|/
* Allow to configure trusted proxies via ↵Felipe Talavera2009-08-091-0/+2
| | | | | | ActionController::Base.trusted_proxies [#2126 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Make http digest work with different server/browser combinationsJosé Valim2009-08-091-1/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix HTTP basic authentication for long credentials [#2572 state:resolved]Jan Schwenzien2009-08-091-1/+1
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Renamed ActionController::Renderer to ActionController::Responder and ↵José Valim2009-08-082-25/+25
| | | | ActionController::MimeResponds::Responder to ActionController::MimeResponds::Collector.
* First pass at making partial rendering an Object. More cleanup to come.Yehuda Katz2009-08-081-3/+0
|
* Renamed presenter to renderer, added some documentation and defined its API.José Valim2009-08-077-211/+250
|
* Encapsulate respond_with behavior in a presenter.José Valim2009-08-071-190/+165
|
* Add destroyed? to ActiveRecord, include tests for polymorphic urls for ↵José Valim2009-08-071-0/+31
| | | | destroyed objects and refactor mime responds tests and documentation.
* Add nagivational behavior to respond_with.José Valim2009-08-072-50/+114
|
* Merge branch 'master' of git://github.com/rails/rails into oldJosé Valim2009-08-071-13/+2
|\
| * Get all ActionController partial rendering to use ActionView's partial code. ↵Yehuda Katz2009-08-071-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Consequences: * It is not possible to always pre-determine the layout before going to ActionView. This was *already* broken for render :partial => @object, :layout => true. This is now handled by overriding render_to_body in layouts.rb and manually injecting the partial's response. This needs to be done in ActionController since ActionController knows enough to get _layout_for_option. There is probably a better abstraction here. * As a result, all partial rendering can correctly restrict their layouts to the mime type of the rendered partial. This could have previously caused a bug in some edge cases. * If other layout-like options are added, they might need to add special code for the case of render :partial. We should try to think of an alternate solution, if possible, but this works for the cases we know of now.
* | Merge branch 'master' of git://github.com/rails/rails into oldJosé Valim2009-08-071-47/+81
|/
* Start cleaning up partial pathYehuda Katz2009-08-071-1/+1
|
* ActionController::Metal#to_rack converted to #to_a to match normal rack ↵Yehuda Katz2009-08-061-1/+1
| | | | convention
* Update _render_options to reflect the fact that they're publicYehuda Katz2009-08-061-6/+6
|
* Rename /base to /metal and make base.rb and metal.rb top-level to reflect ↵Yehuda Katz2009-08-0623-0/+2618
their module locations