aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/dispatch/show_exceptions_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add the `Mime::Type::InvalidMimeType` error in the default rescue_response:Edouard CHIN2019-03-261-0/+6
| | | | | | | | | | | | | | | - https://github.com/rails/rails/pull/35604 introduced a vulnerability fix to raise an error in case the `HTTP_ACCEPT` headers contains malformated mime type. This will cause applications to throw a 500 if a User Agent sends an invalid header. This PR adds the `InvalidMimeType` in the default `rescue_responses` from the ExceptionWrapper and will return a 406. I looked up the HTTP/1.1 RFC and it doesn't stand what should be returned when the UA sends malformated mime type. Decided to get 406 as it seemed to be the status the better suited for this.
* Use env instead of headers on those testsRafael Mendonça França2018-11-261-14/+14
| | | | | We are dealing with the rack env so it is better to specify it in the tests.
* Use frozen string literal in actionpack/Kir Shatrov2017-07-291-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Deprecated ActionDispatch::ParamsParser::ParamsParserRafael Mendonça França2016-10-101-1/+1
| | | | | | ActionDispatch::ParamsParser class was removed in favor of ActionDispatch::Http::Parameters so it is better to move the error constant to the new class.
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-061-17/+17
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Use URL path extension as format in bad params exception handlingJorge Bejar2015-12-081-1/+15
|
* Deprecate exception#original_exception in favor of exception#causeYuki Nishijima2015-11-031-2/+10
|
* Tweaked wording used in some tests.Sebastian McKenzie2015-10-251-2/+2
|
* Remove extra whitespacesSantiago Pastorino2015-06-111-1/+1
|
* Remove Unneeded ApiPublicExceptions middleware, PublicExceptions already ↵Santiago Pastorino2015-06-111-37/+0
| | | | does the work
* Add ApiPublicException middlewareSantiago Pastorino2015-06-111-2/+39
|
* Consistent usage of spaces in hashes across our codebaseRafael Mendonça França2015-01-291-12/+12
|
* Switch to kwargs in ActionController::TestCase and ActionDispatch::IntegrationKir Shatrov2015-01-291-12/+12
| | | | | | | | 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
* Stash original path in `ShowExceptions` middlewareGrey Baker2014-07-141-1/+2
| | | | | | | | | | `ActionDispatch::ShowExceptions` overwrites `PATH_INFO` with the status code for the exception defined in `ExceptionWrapper`, so the path the user was visiting when an exception occurred was not previously available to any custom exceptions_app. The original `PATH_INFO` is now stashed in `env["action_dispatch.original_path"]`.
* Merge pull request #9857 from yyyc514/bad_params_should_400Aaron Patterson2013-04-301-0/+6
|\ | | | | failure to parse params should trigger a 400 Bad Request
| * failure to parse params should trigger a 400 Bad RequestJosh Goebel2013-03-211-0/+6
| |
* | Return a 405 response for unknown HTTP methodsLewis Marshall2013-04-221-0/+6
|/
* Removed unused assigns from ActionView::Template::Errorbrainopia2012-01-201-1/+1
| | | | | They existed since initial rails commit by DHH but lost use a long time ago
* Remove other old compatibility constantsCarlos Antonio da Silva2012-01-171-1/+1
|
* ShowExceptions should understand X-Cascade responses from exceptions app.José Valim2011-12-161-0/+11
|
* Improve the specs on exceptions app.José Valim2011-12-161-1/+14
|
* Extract the rendering of public exceptions pages into a Rack app.José Valim2011-12-161-1/+1
|
* Remove unnecessary test setup.José Valim2011-12-011-6/+1
|
* Split and improve show and debug exceptions middlewares.José Valim2011-12-011-76/+14
|
* Split ShowExceptions responsibilities in two middlewares.José Valim2011-12-011-2/+2
|
* put backtrace_cleaner to envlest2011-11-281-0/+7
|
* middlewares should use logger from envlest2011-11-251-0/+7
|
* refactor show exceptions testslest2011-11-221-42/+19
|
* add ActionController::Metal#show_detailed_exceptions?lest2011-11-221-19/+26
|
* Don't pluralize, camelize.José Valim2011-05-061-2/+2
|
* Sets the HTTP charset parameter for rescue response.Matias Korhonen2011-05-031-0/+7
|
* correction to the outputted controller name in the diagnostics error ↵Josh Kalderimis2011-03-241-0/+16
| | | | | | template, test included Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Show exceptions rescues the original exceptionLes Hill and Sandro Turriate2010-10-121-0/+20
| | | | | | [#5784 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* removing more duplicate codeAaron Patterson2010-10-011-14/+0
|
* Use parentheses when using assert_match followed by a regexp to avoid warnings.Emilio Tagua2010-09-271-7/+7
|
* Remove deprecated stuff in ActionControllerCarlos Antonio da Silva2010-09-261-1/+1
| | | | | | This removes all deprecated classes in ActionController related to Routing, Abstract Request/Response and Integration/IntegrationTest. All tests and docs were changed to ActionDispatch instead of ActionController.
* Revert "Setup explicit requires for files with exceptions. Removed them from ↵José Valim2010-09-021-1/+0
| | | | | | | | autoloading." Booting a new Rails application does not work after this commit [#5359 state:open] This reverts commit 38a421b34d0b414564e919f67d339fac067a56e6.
* Setup explicit requires for files with exceptions. Removed them from ↵Łukasz Strzałkowski2010-09-021-0/+1
| | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* Make sure that rails recognized the full notation of IPv6 loopback address, ↵Prem Sichanugrist2010-06-081-1/+1
| | | | | | and recognize 127.0.0.0/8 in IPv4 Signed-off-by: José Valim <jose.valim@gmail.com>
* Use config.filter_parameters on in-browser request dump. [#4335 state:resolved]José Valim2010-04-071-0/+9
|
* Disable ShowExceptions during integration testsJoshua Peek2010-01-191-11/+11
|
* Make local_request? to returns true when facing ::1 IPv6 address [#3257 ↵Prem Sichanugrist2010-01-171-10/+12
| | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Add ActionDispatch::Notifications middleware.José Valim2010-01-171-23/+0
|
* Ensure no notification is on the queue before running notifications related ↵José Valim2010-01-031-0/+3
| | | | tests.
* Add notifications to ActionDispatch::ShowExceptions, this can be used as ↵José Valim2010-01-031-0/+20
| | | | hooks for plugins like ExceptionNotifier.
* Allow integration test rack app to be set with "@app" ivar instead of using ↵Joshua Peek2009-09-261-4/+4
| | | | open_session
* Ensure changes to I18n locale get reset during testsJoshua Peek2009-09-191-2/+1
|