aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
* Refactor handling of action normalizationMax Shytikov2013-09-101-11/+13
| | | | | | Reference: Bloody mess internals http://gusiev.com/slides/rails_contribution/static/#40
* Merge pull request #12077 from estsauver/doc_fixSteve Klabnik2013-09-041-2/+3
|\ | | | | Update mapper documenation for match helper [ci skip]
| * Update mapper documenation for match helper [ci skip]Earl St Sauver2013-08-301-2/+3
| | | | | | | | | | | | | | | | This piece of documentation is out of date. The use of match without any via option is prevented, now the HTTP verbs have to be explicitly set. If they're not set then the error message in normalize_conditions! (around line 186) is shown.
* | Reuse variable to avoid symbol usageCarlos Antonio da Silva2013-08-311-2/+2
| |
* | Merge pull request #11912 from jonkessler/respond-to-signature-fixesRafael Mendonça França2013-08-311-1/+1
|\ \ | |/ |/| Update Rails::Railtie::Configuration and ActionDispatch::Response#respond_to? to accept include_private argument
| * update Rails::Railtie::Configuration and ↵Jon Kessler2013-08-161-1/+1
| | | | | | | | ActionDispatch::Response#respond_to? to accept include_private argument
* | Display exceptions in text format for xhr requestKir Shatrov2013-08-2213-13/+84
| |
* | Escape the message of an exception in debug_exceptions to avoid bad renderingAdrien Siami2013-08-215-5/+5
| |
* | Use each_with_objectSantiago Pastorino2013-08-191-4/+2
| |
* | Organize normalize_encoding_params' conditionals a bit better and use a case ↵Santiago Pastorino2013-08-191-15/+18
| | | | | | | | | | | | statement for it Refactor of the work done in #11891
* | Merge pull request #11891 from robertomiranda/remove_upload_moduleSantiago Pastorino2013-08-193-14/+2
|\ \ | | | | | | Normalize file parameters in same place as other parameters (ActionDispatch::Http::Parameters#normalize_encode_params)
| * | Normalize file parameters in same place as other parameters ↵robertomiranda2013-08-143-14/+2
| |/ | | | | | | (ActionDispatch::Http::Parameters#normalize_encode_params)
* | Merge branch 'master' of github.com:rails/docrailsVijay Dev2013-08-171-13/+11
|\ \ | |/ |/| | | | | | | | | | | Conflicts: actionview/README.rdoc activerecord/lib/active_record/migration.rb guides/source/development_dependencies_install.md guides/source/getting_started.md
| * Revert "Merge branch 'master' of github.com:rails/docrails"Vijay Dev2013-08-171-13/+11
| | | | | | | | | | | | | | This reverts commit 70d6e16fbad75b89dd1798ed697e7732b8606fa3, reversing changes made to ea4db3bc078fb3093ecdddffdf4f2f4ff3e1e8f9. Seems to be a code merge done by mistake.
* | Pass assert_dom_equal message arg to underlying assertionRyan McGeary2013-08-041-4/+4
|/ | | | | #assert_dom_equal and #assert_dom_not_equal both take a "failure" message argument, but this argument was not utilized.
* Refactor handling of action normalizationMax Shytikov2013-07-261-11/+13
| | | | | | Reference: Bloody mess internals http://gusiev.com/slides/rails_contribution/static/#40
* Allow overriding of all headers from passed environment hashAndrew White2013-07-251-5/+5
| | | | | | | Allow REMOTE_ADDR, HTTP_HOST and HTTP_USER_AGENT to be overridden from the environment passed into `ActionDispatch::TestRequest.new`. Fixes #11590
* Clear named routes when routes.rb is reloadedAndrew White2013-07-211-0/+1
| | | | | | | | Fix an issue where Journey was failing to clear the named routes hash when the routes were reloaded and since it doesn't overwrite existing routes then if a route changed but wasn't renamed it kept the old definition. This was being masked by the optimised url helpers so it only became apparent when passing an options hash to the url helper.
* Refactor to reduce number of loopsAndrew White2013-07-171-15/+25
| | | | | | Only build the missing_keys array once we have detected that there actually are missing keys by moving the check to be part of the block that performs the path substitution.
* Fix failing test missed for the past year :(Andrew White2013-07-171-2/+17
| | | | | | | | | When optimized path helpers were re-introduced in d7014bc the test added in a328f2f broke but no-one noticed because it wasn't being run by the test suite. Fix the test by checking for nil values or empty strings after the args have been parameterized.
* Skip Rack applications and redirects when generating urlsAndrew White2013-07-162-1/+17
| | | | | | | | | | When generating an unnamed url (i.e. using `url_for` with an options hash) we should skip anything other than standard Rails routes otherwise it will match the first mounted application or redirect and generate a url with query parameters rather than raising an error if the options hash doesn't match any defined routes. Fixes #8018
* Merge pull request #11351 from jetthoughts/cleanup_requestRafael Mendonça França2013-07-091-1/+1
|\ | | | | Use content_length method instead of ENV['CONTENT_LENGTH'].to_i
| * Use helper method to get ENV['CONTENT_LENGTH']Paul Nikitochkin2013-07-081-1/+1
| |
* | Use Request#raw_post instead Request#bodyPaul Nikitochkin2013-07-081-1/+1
|/ | | | | | | | In order to get raw_post to be not empty after ParamsParser#parse_formatted_parameters, added rewinding of body stream input on parsing json params. Closes #11345
* Space is not required for Set-Cookie headerYamagishi Kazutoshi2013-07-051-1/+1
|
* remove useless `env.merge!(env)` from ActionDispatch::IntegrationTest`Yves Senn2013-07-041-2/+0
|
* Missing closing + in documentation [ci skip]Edho Arief2013-07-041-1/+1
|
* Remove deprecated Rails application fallback for integration testingCarlos Antonio da Silva2013-07-021-4/+0
| | | | Set ActionDispatch.test_app instead.
* store a symbol directly inside DISPATCH_CACHE for extra roflscaleCharlie Somerville2013-06-301-1/+1
|
* writing the new body can cause the response to be committed and theAaron Patterson2013-06-281-1/+3
| | | | | | | | request thread to return up the stack before the instance variable is assigned. Synchronize so that the ivar is assigned before the other thread can activate. fixes #10984
* Merge pull request #11000 from sbeckeriv/accept_headerCarlos Antonio da Silva2013-06-251-1/+1
|\ | | | | | | Fix undefined method `ref' for nil:NilClass for bad accept headers
| * Fix undefined method `ref' for nil:NilClass for bad accept headersStephen Becker IV2013-06-191-1/+1
| |
* | Fix shorthand routes where controller and action are in the scopeAndrew White2013-06-251-2/+10
| | | | | | | | | | | | | | | | | | Merge `:action` from routing scope and assign endpoint if both `:controller` and `:action` are present. The endpoint assignment only occurs if there is no `:to` present in the options hash so should only affect routes using the shorthand syntax (i.e. endpoint is inferred from the the path). Fixes #9856
* | Merge pull request #11069 from ykzts/actiondispatch-ssl-secure-flag-igonore-caseGuillermo Iguaran2013-06-241-1/+1
|\ \ | | | | | | Flag cookies as secure with ignore case in ActionDispatch::SSL
| * | Flag cookies as secure with ignore case in ActionDispatch::SSLYamagishi Kazutoshi2013-06-241-1/+1
| | |
* | | ActionDispatch:SSL: don't include STS header in non-https responsesGeoff Buesing2013-06-231-2/+1
|/ /
* / Don't remove trailing slash from PATH_INFO for mounted appsPiotr Sarnacki2013-06-211-1/+7
|/ | | | | | | | | | | | | | | | | | | | | | | | | Previously when app was mounted as following: class Foo def call(env) [200, {}, [env['PATH_INFO']]] end end RackMountRailsBug::Application.routes.draw do mount RackTest.new => "/foo" end trailing slash was removed from PATH_INFO. For example requesting GET /foo/bar/ on routes defined above would result in a response containing "/foo/bar" instead of "/foo/bar/". This commit fixes the issue. (closes #3215)
* Don't set X-UA-Compatible header by defaultGuillermo Iguaran2013-06-131-2/+1
| | | | | | We are setting this header to chrome=1 for Chrome Frame and this will be retired soon. Check http://blog.chromium.org/2013/06/retiring-chrome-frame.html for details
* Grammar nazi at work [ci skip]Paweł Gościcki2013-06-121-1/+1
|
* Merge pull request #10839 from gsamokovarov/clean-normalize_encoded_pathsRafael Mendonça França2013-06-041-11/+7
|\ | | | | Refactor ActionDispatch::Http::Parameters#normalize_encode_params
| * Refactor ActionDispatch::Http::Parameters#normalize_encode_paramsGenadi Samokovarov2013-06-041-11/+7
| |
* | Merge pull request #10838 from gsamokovarov/routing-autoload_underRafael Mendonça França2013-06-041-5/+7
|\ \ | | | | | | DRY-up ActionDispatch::Routing autoloads
| * | Dry-up ActionDispatch::Routing autoloadsGenadi Samokovarov2013-06-041-5/+7
| |/
* | Remove Mime::Type#verify_request? and Mime::Type.browser_generated_types ↵kennyj2013-06-021-16/+0
| | | | | | | | were deprecated.
* | Add propery docs to ActionDispatch::Response [ci skip]Steve Klabnik2013-05-301-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | After some discussion on Twitter with @skud, the documentation on ActionDispatch::Response is a bit sparse. This class is useful when you're writing tests, as often you want to assert various things about the response that's coming back. Better docs would make this easier for people new to testing in Rails. I only added some descriptions for various properties that were defined, and mostly just a sentence or two. Most of these things are familliar if you're working with HTTP, but some words is better than no words at all. Hopefully further commits will fix up things that aren't just documentation.
* | Merge pull request #10803 from gsamokovarov/extract-deep-mungeRafael Mendonça França2013-05-303-18/+27
|\ \ | | | | | | Extract ActionDispatch::Request#deep_munge
| * | Extract ActionDispatch::Request#deep_mungeGenadi Samokovarov2013-05-303-18/+27
| |/ | | | | | | | | | | | | | | | | ActionDispatch::Request#deep_munge was introduced as a private method, but was turned into a public one for the use of ActionDispatch::ParamsParser. I have extracted it into ActionDispatch::Request::Utils, so it does not get mixed up with the Request public methods.
* / `RoutesInspector` deals with routes using regexp as `:controller` optionYves Senn2013-05-301-1/+1
|/
* Require only minitest.Rafael Mendonça França2013-05-221-1/+1
| | | | | minitest/autorun required minitest/spec and we are avoiding to require it.
* Merge pull request #10667 from rubys/minitest-autorunRafael Mendonça França2013-05-221-1/+1
|\ | | | | Eliminate minitest warnings