aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware
Commit message (Collapse)AuthorAgeFilesLines
* Tiny documentation edits [ci skip]Robin Dupret2015-05-041-1/+1
| | | | | | * Fix a few typos * Wrap lines to 80 chars * Use `+` instead of `<tt>`
* Use ruby 1.9 lambda syntax in documentations [ci skip]Mehmet Emin İNAÇ2015-05-031-2/+2
|
* Document :tld_length option for cookies.Ryan Wallace2015-04-291-0/+3
|
* No need to capitalize verbs. [CI SKIP]Guo Xiang Tan2015-04-261-2/+2
|
* Add nodoc to some private constants [ci skip]Rafael Mendonça França2015-04-231-3/+3
|
* Merge pull request #19823 from sbhatore/doc_fix_1Rafael Mendonça França2015-04-231-0/+8
|\ | | | | [ci skip] Description inside Signed and Encrypted CookieJars added
| * Squashed commit of the following:Siddharth Bhatore2015-04-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit a88875ac6abaa4d8116b42af8cd71189ce3d44d3 Author: Siddharth Bhatore <sbhatore95@gmail.com> Date: Thu Apr 23 12:26:08 2015 +0530 [ci skip] Update doc fix cookies commit f175eaa7a21db898fc6c66334f770831028f9d00 Author: Siddharth Bhatore <sbhatore95@gmail.com> Date: Mon Apr 20 12:58:04 2015 +0530 Description inside Signed and Encrypted CookieJars added
* | [ci skip] Add, clean up docs in ActionDispatch ActionDispatch middlewareNick Cox2015-04-221-6/+13
| |
* | [ci skip] UpgradeLegacySignedCookieJar Doc fixSiddharth Bhatore2015-04-221-2/+2
|/
* [Rails4 regression] prevent thin and puma cause error in Non ASCII URL on ↵Toshi MARUYAMA2015-04-091-1/+1
| | | | | | | | | | | | | | | | | | | Windows * https://github.com/rails/rails/issues/19187 * https://github.com/rails/rails/pull/19533 * https://github.com/macournoyer/thin/issues/268 These are serious Rails 4 regression for Redmine Bitnami Windows users. https://community.bitnami.com/t/problems-with-3-0-1-installation-see-report-inside/30195/ It is not caused on webrick users. Related: * https://github.com/rack/rack/issues/732#issuecomment-67677272 * https://github.com/phusion/passenger/issues/1328
* Fix ActionDispatch::PublicExceptions returning string rack statusRyan Tomayko2015-03-231-2/+2
| | | | | | | | The status returned in the rack [status, headers, body] array was a string, which can cause problems with middleware that assumes the status will be a Fixnum. This likely never surfaced because other middleware to_i the status returned from downstream apps before passing it on.
* Also skip Content-Encoding and Vary header if 304Kohei Suzuki2015-03-121-3/+4
|
* 304 response should not include Content-Type headerKohei Suzuki2015-03-101-1/+3
| | | | | Rack::Lint raises an error saying "Content-Type header found in 304 response, not allowed".
* Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-03-013-3/+20
|\
| * Explained how to set session expiry through session_store configIain Beeston2015-02-273-3/+20
| | | | | | | | | | | | Most session stores offer an :expire_after option, but it's largely undocumented. Cookie store also supports a number of options via rack (these used to be documented in rails 2.3)
* | Change filter on /rails/info/routes to use an actual path regexp from railsbrainopia2015-02-232-67/+63
| | | | | | | | | | | | | | | | Change filter on /rails/info/routes to use an actual path regexp from rails and not approximate javascript version. Oniguruma supports much more extensive list of features than javascript regexp engine. Fixes #18402.
* | Aliased the ActionDispatch::Request#uuid method with ↵David Ilizarov2015-02-201-1/+1
| | | | | | | | ActionDispatch::Request#request_id
* | Freeze strings to reduce allocations in integration testseileencodes2015-02-181-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Moves `X-Request-ID`, `action_dispatch.request_id` and `HTTP_X_REQUEST_ID` strings to constants and freezes them. We are freezing these strings to reduce the number of allocations in Rails integration tests. The tests are spending a lot of time in GC and this reduces the amount of time spent from 12% to 9% (in combination with Rack PR that also freezes some strings). Number of allocations before this change: 1030722 Number of allocations after this change: 967722
* | Reduce the number of times `#clean_path_info` is calledeileencodes2015-02-181-3/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | It's unnecessary to call `#clean_path_info`. It doesn't need to be called on the path with each extension. This reduces allocations to `Rack::Utils` in integration tests. Before `#clean_path_info` from `Rack::Utils` (line 622) was number 2 in top 5 allocations: ``` [["rack/lib/rack/utils.rb", 499, :T_STRING], [51034, 4539, 71559, 0, 12, 1791120]] [["rack/lib/rack/utils.rb", 662, :T_STRING], [33012, 0, 27930, 0, 1, 1226009]] [["rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [29998, 0, 25380, 0, 1, 3230600]] [["rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [29996, 0, 25378, 0, 2, 1113840]] [["rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [29994, 147, 27014, 0, 11, 4897784]] ``` After `#clean_path_info` from `Rack::Utils` (line 622) does not appear in the top 5 highest allocations: ``` [["rack/lib/rack/utils.rb", 499, :T_STRING], [47617, 2414, 68969, 0, 12, 1667360]] [["rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [28230, 0, 26060, 0, 1, 1046800]] [["rails/activesupport/lib/active_support/notifications/fanout.rb", 55, :T_DATA], [28208, 0, 26042, 0, 1, 3034096]] [["rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [28204, 0, 26040, 0, 1, 1046080]] [["rails/activesupport/lib/active_support/callbacks.rb", 165, :T_DATA], [28200, 0, 26046, 0, 2, 3451800]] ```
* require rack/utils in exception_wrapperAndrew Lazarus2015-02-121-0/+1
|
* Merge pull request #18721 from sj26/pre-discard-flashAaron Patterson2015-02-011-17/+23
|\ | | | | Pre-discard flash messages
| * Migrate old flash behaviourSamuel Cochran2015-01-301-0/+6
| |
| * Discard from flash before persisting in sessionSamuel Cochran2015-01-291-17/+17
| |
* | Show proper traces on Windows for the error pagesGenadi Samokovarov2015-02-011-2/+8
|/ | | | | | | | | | | | | | | | | | | | | | This is an issue brought up by @daniel-rikowski in rails/web-console#91. Citing his PR proposal here: > Prior to this, backtrace lines were simply split by a single colon. > > Unfortunately that is also the drive letter delimiter in Windows paths > which resulted in a lot of empty source fragments of "C:0". ("C" from > the drive letter and 0 from "/path/to/rails/file.rb:16".to_i) > > Now the trace line is split by the first colon followed by some digits, > which works for both Windows and Unix path styles. Now, the PR was sent against web-console, because of the templates copy issue we used to had. Instead of bothering the contributor to reopen the issue against upstream Rails itself, I will make sure he gets the credit by putting his name in [rails-contributors/hard_coded_authors.rb][]. [rails-contributors/hard_coded_authors.rb]: (https://github.com/fxn/rails-contributors/blob/master/app/models/names_manager/hard_coded_authors.rb).
* Changing sets -> set Lindsey Bieda2015-01-061-1/+1
| | | Updating some minor grammar issue.
* - Removed unused parameter to cookie serialize method and fixed usage of the ↵Vipul A M2014-12-241-4/+4
| | | | same elsewhere
* We don't need to call to_sym. Just compare the stringRafael Mendonça França2014-12-041-1/+1
|
* Merge pull request #17792 from rockrep/masterRafael Mendonça França2014-12-041-1/+1
|\ | | | | | | allow 'all' for :domain option in addition to :all
| * allow 'all' for :domain option in addition to :allrockrep2014-11-261-1/+1
| |
| * Revert "Invert precedence of content in ActionDispatch::Static"Andrew White2012-12-071-11/+7
| | | | | | | | This reverts commit c59734f756b79c39486c45273d2cc5d42cd0c864.
| * Invert precedence of content in ActionDispatch::StaticAndrew White2012-12-061-7/+11
| | | | | | | | | | | | | | | | | | | | This commit inverts the precedence in ActionDispatch::Static so that dynamic content will be served before static content. This is so that precompiled assets do not inadvertently get included when running in development mode - it should have no effect in production where static files are usually handled by the web server. Closes #6421
* | Action View is needed for DebugExceptionsRafael Mendonça França2014-12-021-0/+2
| | | | | | | | We should remove this dependency later.
* | Refactor debug viewKir Shatrov2014-12-023-23/+31
| | | | | | Avoid logic in ERB and use helpers
* | Pretty-print request params on exception pageKir Shatrov2014-12-012-1/+9
| |
* | Merge pull request #17803 from sadfuzzy/patch-2Abdelkader Boudih2014-11-271-1/+3
| | | | | | | | | | | | Update cookies.rb Conflicts: actionpack/lib/action_dispatch/middleware/cookies.rb
* | Merge pull request #17728 from jcutrell/jcutrell/docs-to_session_value-for-prRafael Mendonça França2014-11-251-3/+6
|\ \ | | | | | | Adding simple docs for ActionDispatch::Flash::FlashHash#to_session_value
| * | adding nodoc to private methodsJonathan Cutrell2014-11-231-2/+2
| | |
| * | Adding simple docs for ActionDispatch::Flash::FlashHash#to_session_valueJonathan Cutrell2014-11-231-1/+4
| | |
* | | Merge pull request #17733 from yuki24/do-not-rescue-exception-in-params-parserRafael Mendonça França2014-11-251-1/+1
|\ \ \ | | | | | | | | Do not rescue Exception in ActionDispatch::ParamsParser
| * | | Do not rescue Exception in ParamsParserYuki Nishijima2014-11-231-1/+1
| |/ / | | | | | | | | | | | | Unlike ShowExceptions or PublicExceptions, ParamsParser shouldn't transform exceptions like Interrupt and NoMemoryError into ParserError.
* | | Don't center the routes table on routing errorsGenadi Samokovarov2014-11-241-1/+1
| | |
* | | Show source view and backtrace on missing template errorsGenadi Samokovarov2014-11-242-0/+6
|/ / | | | | | | | | | | | | | | | | This will help you debug missing template errors, especially if they come from a programmatic template selection. Thanks to @dhh for suggesting that. As a bonus, also show request and response info on the routing error page for consistency.
* | [ci skip] Fix comment of ActionDispatch::Callbacksyui-knk2014-11-231-1/+1
| | | | | | | | cc ddce3dd
* | Merge pull request #17630 from gsamokovarov/exception-wrapper-source-extractGuillermo Iguaran2014-11-163-8/+8
|\ \ | | | | | | Rename #source_extract to #source_extracts in ExceptionWrapper
| * | Rename #source_extract to #source_extracts in ExceptionWrapperGenadi Samokovarov2014-11-163-8/+8
| | | | | | | | | | | | | | | It returns multiple source extracts since 1ed264bc. Also cleaned its result structure, as we no longer need the file in a code extract.
* | | Merge pull request #17639 from gsamokovarov/faster-exception-wrapper-tracesGuillermo Iguaran2014-11-161-2/+6
|\ \ \ | | | | | | | | Don't double check trace origin in ExceptionWrapper#traces
| * | | Don't double check trace origin in ExceptionWrapper#tracesGenadi Samokovarov2014-11-161-2/+6
| |/ / | | | | | | | | | | | | | | | If a trace isn't an application one, then it comes from a framework. That's the definition of framework trace. We can speed up the traces generation if we don't double check that.
* / / Don't show full trace on routing errorsGenadi Samokovarov2014-11-161-1/+1
|/ / | | | | | | | | | | | | | | | | | | Since dbcbbcf2bc58e8971672b143d1c52c0244e33f26 the full trace is shown by default on routing errors. While this is a nice feature to have, it does take the attention off the routes table in this view and I think this is what most of the people look for in this page. Added an exception to the default trace switching rule to remove that noise.
* | Don't let #{application,framework,full}_trace be nilGenadi Samokovarov2014-11-162-31/+31
| | | | | | | | | | | | Those three can be nil when exception backtrace is nil. This happens and that forced a couple of nil guards in the code. I'm proposing to make those always return an array, even on nil backtrace.
* | Make FlashHash#key? work with symbol and stringRafael Mendonça França2014-11-111-1/+1
| | | | | | | | Closes #17586