aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
* 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
| * Eliminate minitest warningsSam Ruby2013-05-171-1/+1
| | | | | | | | https://github.com/seattlerb/minitest/commit/9a57c520ceac76abfe6105866f8548a94eb357b6#L15R8
* | Add has_named_route? to the mapper APIJosé Valim2013-05-201-0/+5
|/
* Fix named routing regression from 3.2.13schneems2013-05-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | When named route that is nested is used in 3.2.13 Example `routes.rb`: ``` resources :nested do resources :builder, :controller => 'nested/builder' end ``` In 3.2.12 and 3.2.12 this named route would work: ``` nested_builder_path(:last_step, :nested_id => "foo") ``` Generating a url that looks like `/nested/foo/builder/last_step`. This PR fixes the regression when building urls via the optimized helper. Any explicit keys set in the options are removed from the list of implicitly mapped keys. Not sure if this is exactly how the original version worked, but this fixes this use case regression.
* Revert "Integration tests support the OPTIONS http method"Rafael Mendonça França2013-05-161-7/+1
| | | | | | | | | | | | | | This reverts commit ad46884af567d6f8d6d8d777f372c39e81a560ba. Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_dispatch/testing/integration.rb actionpack/test/controller/integration_test.rb Reason: It will conflict with a lot of test cases. Better to call `process` directly since this is a very uncommon HTTP method. Fixes #10638.
* Fixing build broken by this changeArun Agrawal2013-05-131-2/+2
| | | | c43ca06ca091fc09e2c86bb051ac92b648f12b64
* Code cleanup for ActionDispatch::Flash#callJulian Vargas2013-05-121-9/+3
| | | | | | | The nested `if` was replaced by using `presence` which takes account for the given hash when it is `nil` or when it is empty. The `else` was removed because what it was doing was to assign to `env[KEY]` the value it already had.
* Merge pull request #10536 from vipulnsward/fix_exp_warningCarlos Antonio da Silva2013-05-091-1/+0
|\ | | | | remove variable and fix warning
| * remove variable and fix warningVipul A M2013-05-091-1/+0
| |
* | rails -> Rails [ci skip]Prathamesh Sonpatki2013-05-091-1/+1
|/
* Fix that JSON and XML exception responses should give the HTTP error message ↵Jeremy Kemper2013-05-081-2/+2
| | | | for their status, by default, not the message from the underlying exception
* Merge pull request #10426 from tkrajcar/rescue-h1-fixCarlos Antonio da Silva2013-05-021-0/+6
|\ | | | | Add styling to h1 for default rescue layout
| * Add styling to h1Tim Krajcar2013-05-021-0/+6
| |
* | use constant for encodingNihad Abbasov2013-05-021-1/+1
|/
* Merge pull request #9857 from yyyc514/bad_params_should_400Aaron Patterson2013-04-301-0/+1
|\ | | | | failure to parse params should trigger a 400 Bad Request
| * failure to parse params should trigger a 400 Bad RequestJosh Goebel2013-03-211-0/+1
| |
* | add missing semicolon to journey parser.yBen Holley2013-04-301-0/+1
| |
* | Rack::Mount was replaced by Journey, Fixed commentGaurish Sharma2013-04-301-1/+1
| |
* | Merge pull request #10301 from vipulnsward/extract_in_mapperAndrew White2013-04-221-2/+4
|\ \ | | | | | | extract arrays to constants in Mapper