aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/request
Commit message (Collapse)AuthorAgeFilesLines
* Fix typoRafael Mendonça França2016-02-171-1/+1
|
* The JSON API media type should only work wih a JSON API handlerBenjamin Fleischer2016-02-161-9/+2
| | | | | | | | | | | | Since the media type 'application/vnd.api+json' is a spec, it is inappropriate to handle it with the JSON renderer. This PR removes support for a JSON API media type. I would recommend the media type be registered on its own as `jsonapi` when a jsonapi Renderer and deserializer (Http::Parameters::DEFAULT_PARSERS) are added. Is related to work in https://github.com/rails/rails/pull/21496
* Push `before_sending` to super classeileencodes2015-12-061-1/+1
| | | | | | | | | | | | We want to get rid of the `Live::Response` so we are consolidating methods from `Live::Response` and `Response` by merging them together. This adds an `#empty` method to the request so we don't need to hard-code the empty array each time we call an empty `ActionDispatch::Request`. The work here is a continuation on combining controller and integration test code bases into one.
* Deprecate exception#original_exception in favor of exception#causeYuki Nishijima2015-11-031-2/+2
|
* Merge pull request #21251 from rodzyn/more_param_parser_testsSean Griffin2015-10-301-0/+14
|\ | | | | Add test for parsing application/vnd.api+json
| * Add test for parsing application/vnd.api+jsonMarcin Olichwirowicz2015-08-211-0/+14
| |
* | implement abstract store methodsAaron Patterson2015-09-041-1/+1
| | | | | | | | converts old ID methods to the new abstract store methods in Rack
* | use a request object in the session middlewareAaron Patterson2015-08-221-19/+21
|/ | | | | This commit allows us to use one request object rather than allocating multiple request objects to deal with the session.
* point at rack masterAaron Patterson2015-08-201-1/+1
|
* Add failing spec on utf8 filename with percent characterKohei Suzuki2015-08-041-0/+11
|
* Stop using deprecated `render :text` in testPrem Sichanugrist2015-07-171-1/+1
| | | | | | | | | This will silence deprecation warnings. Most of the test can be changed from `render :text` to render `:plain` or `render :body` right away. However, there are some tests that needed to be fixed by hand as they actually assert the default Content-Type returned from `render :body`.
* Make AC::Parameters not inherited from HashPrem Sichanugrist2015-07-151-1/+1
| | | | | | | | This is another take at #14384 as we decided to wait until `master` is targeting Rails 5.0. This commit is implementation-complete, as it guarantees that all the public methods on the hash-inherited Parameters are still working (based on test case). We can decide to follow-up later if we want to remove some methods out from Parameters.
* Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 ↵Vipul A M2015-02-031-1/+0
| | | | onwards.
* Consistent usage of spaces in hashes across our codebaseRafael Mendonça França2015-01-293-3/+3
|
* Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-294-16/+15
| | | | | | | | Non-kwargs requests are deprecated now. Guides are updated as well. `post url, nil, nil, { a: 'b' }` doesn't make sense. `post url, params: { y: x }, session: { a: 'b' }` would be an explicit way to do the same
* Don't convert empty arrays to nils when deep munging paramsChris Sinjakli2014-12-152-4/+4
|
* Merge pull request #13999 from jamox/update_rackAaron Patterson2014-07-081-1/+5
|\ | | | | This updates rails to use edge rack
| * Upgraded rackJarmo Isotalo2014-05-191-1/+5
| | | | | | | | | | | | | | | | As Rack has some non backwards compatible changes added required modifications to keep behaviour in rails close to same as before. Also modified generators to include rack/rack for not yet released version of rack
* | Avoid hardcoded value in test setup/teardown.Zuhao Wan2014-06-051-1/+2
| |
* | Merge pull request #15349 from tgxworld/remove_duplicated_method_callRafael Mendonça França2014-06-031-4/+1
|\ \ | | | | | | Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
| * | Remove duplicated HashWithIndifferentAccess#with_indifferent_access.Guo Xiang Tan2014-05-261-4/+1
| |/
* / Routes specifying 'to:' must be a string that contains a "#" or a rackAaron Patterson2014-06-031-2/+2
|/ | | | | application. Use of a symbol should be replaced with `action: symbol`. Use of a string without a "#" should be replaced with `controller: string`.
* Cleaning and adding tests for SessionAttila Domokos2014-03-191-7/+34
| | | Adding tests for Session `destroy`, `update` and `delete` methods. No changes for code under test.
* test boolean and number json param parsingArthur Neves2014-01-231-0/+7
|
* Merge pull request #13188 from imanel/skip_deep_mungeJeremy Kemper2013-12-191-0/+15
|\ | | | | | | | | | | | | Add configuration option to optionally disable deep_munge Conflicts: actionpack/CHANGELOG.md
| * Add configuration option to optionally disable deep_mungeBernard Potocki2013-12-051-0/+15
| |
* | Make ActionDispatch::Request::Session#fetch behave like Hash#fetchTrent Ogren2013-12-111-3/+2
|/ | | | | | Session#fetch was mutating the session when given a default argument and/or a block. Since Session duck-types as a Hash, it should behave like one in these cases.
* Deep Munge the parameters for GET and POSTMichael Koziarski2013-12-021-0/+15
| | | | | | | | The previous implementation of this functionality could be accidentally subverted by instantiating a raw Rack::Request before the first Rails::Request was constructed. Fixes CVE-2013-6417
* session#fetch doesn't behave exactly like Hash#fetch.Damien Mathieu2013-10-301-1/+5
| | | | | | | | | Mention it in the changelog and add a test checking for regressions. Hash#fetch isn't adding the defaultly returned value. However, in the session, saving it is the behavior we should expect. See discussion in #12692
* add the fetch method to sessionsDamien Mathieu2013-10-291-0/+13
|
* Use Request#raw_post instead Request#bodyPaul Nikitochkin2013-07-081-0/+7
| | | | | | | | 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
* Cleanup ul_encoded_params_parsing_testGenadi Samokovarov2013-07-051-25/+27
|
* use bytesize rather than force encodingAaron Patterson2013-06-281-2/+1
|
* Replace multi_json with jsonErik Michaels-Ober2013-05-111-1/+1
|
* Fix failing AP testCarlos Antonio da Silva2013-05-011-1/+1
|
* UTF-8 encode all keys and values in nested params hash.Teo Hui Ming2013-03-151-1/+20
|
* Change from each to each_value on hash to avoid unused variable warningVipul A M2013-03-111-1/+1
|
* Remove XML Parser from ActionDispatchPrem Sichanugrist2013-02-201-182/+0
| | | | | If you want an ability to parse XML parameters, please install `actionpack-xml_parser` gem.
* Fix json params parsing regression for non-object JSON content.Dylan Smith2013-01-111-0/+7
| | | | Fixes #8845.
* Remove :yaml related tests and fix other related to parsing empty arraysCarlos Antonio da Silva2013-01-081-2/+2
| | | | All Action Pack tests are green.
* * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * ↵Aaron Patterson2013-01-082-0/+32
| | | | | | | | | | | | dealing with empty hashes. Thanks Damien Mathieu Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_dispatch/http/request.rb actionpack/lib/action_dispatch/middleware/params_parser.rb activerecord/CHANGELOG.md activerecord/lib/active_record/relation/predicate_builder.rb activerecord/test/cases/relation/where_test.rb
* Revert "Merge branch 'master-sec'"Jeremy Kemper2013-01-082-32/+0
| | | | | This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing changes made to f049016cd348627bf8db0d72382d7580bf802a79.
* * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * ↵Aaron Patterson2013-01-072-0/+32
| | | | | | | | | | | | dealing with empty hashes. Thanks Damien Mathieu Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_dispatch/http/request.rb actionpack/lib/action_dispatch/middleware/params_parser.rb activerecord/CHANGELOG.md activerecord/lib/active_record/relation/predicate_builder.rb activerecord/test/cases/relation/where_test.rb
* Alias refute methods to assert_not and perfer assert_not on testsRafael Mendonça França2012-12-311-1/+1
|
* Prevent raising EOFError on multipart GET request.Adam Stankiewicz2012-12-101-0/+12
| | | | | | | | | | Such request can happen on Internet Explorer. When we redirect after multipart form submission, the request type is changed to GET, but Content-Type is preserved as multipart. GET request cannot have multipart body and that caused Rails to fail. It's similar fix to Rack's one: https://github.com/chneukirchen/rack/blob/8025a4ae9477d1e6231344c2b7d795aa9b3717b6/lib/rack/request.rb#L224
* Merge pull request #7444 from szimek/params_parser_raises_parsing_errorAaron Patterson2012-09-262-2/+6
|\ | | | | Raise generic ParseError exception when ParamsParser fails parsing request params
| * Make ActionDispatch::ParamsParser::ParseError#original_exception return the ↵Szymon Nowak2012-08-272-2/+4
| | | | | | | | original exception.
| * Fix ActionDispatch::ParamsParser::ParseError message for XML and JSON parsers.Szymon Nowak2012-08-242-2/+4
| |
| * Raise generic ParseError exception when ActionDispatch::ParamsParser fails ↵Szymon Nowak2012-08-242-2/+2
| | | | | | | | parsing request params.
* | Add test for clear in ActionDispatch::Request::SessionAndreas Loupasakis2012-09-081-0/+9
|/