aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Rack implements `redirect?` so we don't need itAaron Patterson2015-07-141-3/+0
| | | | | | | | | | | | Rack [already implements `redirect?` on the response object](https://github.com/rack/rack/blob/1569a985e17d9caaf94d0e97d95ef642c4ab14ba/lib/rack/response.rb#L141) so we don't need to implement our own.
* | | use a lookup table for `assert_response`Aaron Patterson2015-07-131-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | We shouldn't depend on specific methods imlemented in the TestResponse subclass because the response could actually be a real response object. In the future, we should either push the aliased predicate methods in TestResponse up to the real response object, or remove them
* | | move buffer caching on to the bufferAaron Patterson2015-07-131-3/+11
| | |
* | | Merge pull request #20842 from TheBlasfem/removed_usage_lines_docsClaudio B.2015-07-111-1/+1
|\ \ \ | | | | | | | | Removed usage line docs [ci skip]
| * | | added description instead of remove usage [ci skip]Julio Lopez2015-07-111-1/+1
| | | |
* | | | Merge pull request #17102 from matthewd/load-interlockAaron Patterson2015-07-101-0/+21
|\ \ \ \ | | | | | | | | | | Concurrent load interlock (rm Rack::Lock)
| * | | | Fix the Interlock middlewareMatthew Draper2015-07-091-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | We can't actually lean on Rack::Lock's implementation, so we'll just copy it instead. It's simple enough that that's not too troubling.
| * | | | Soften the lock requirements when eager_load is disabledMatthew Draper2015-07-091-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | We don't need to fully disable concurrent requests: just ensure that loads are performed in isolation.
* | | | | start disconnecting the parameter parser from the instanceAaron Patterson2015-07-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | pass in the instance variable to start decoupling the meat of the parser from the instance of the middleware
* | | | | drop a conditional by always assigningAaron Patterson2015-07-101-6/+5
| |/ / / |/| | | | | | | | | | | | | | | We will always make an assignment to the env hash and eliminate a conditional
* | | | drop runtime conditionals in parameter parsingAaron Patterson2015-07-091-13/+9
| | | | | | | | | | | | | | | | | | | | If we only deal with proc objects, then we can eliminate type checking in the parameter parsing middleware
* | | | assign the cookie hash on request allocationAaron Patterson2015-07-081-1/+1
| | | | | | | | | | | | | | | | this prevents mutations from being available globally
* | | | add a new constructor for allocating test requestsAaron Patterson2015-07-082-9/+9
| | | |
* | | | make `env` a required parameterAaron Patterson2015-07-081-1/+1
| | | |
* | | | pass the starting env and session to build_requestAaron Patterson2015-07-081-1/+1
| | | |
* | | | let the superclass build the request and responseAaron Patterson2015-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | We should leverage the request / response objects that the superclass has already allocated for us.
* | | | remove useless `new` implementationAaron Patterson2015-07-081-4/+0
|/ / /
* | | pass cookies from the jar in the HTTP_COOKIE headereileencodes2015-07-071-9/+4
| | | | | | | | | | | | | | | we should be pushing the cookies in via headers rather than maintaining some object and "recycling" it.
* | | Send cookies with requesteileencodes2015-07-072-1/+5
| | |
* | | Merge pull request #13897 from gmalette/nested-parameter-filtering-2Arthur Nogueira Neves2015-07-061-7/+17
|\ \ \ | | | | | | | | Allow filtering params based on parent keys
| * | | Allow filtering params based on parent keysGuillaume Malette2015-06-221-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the possibility to only filter parameters based on their full path instead of relying on the immediate key. config.filter_parameters += ['credit_card.code'] { 'credit_card' => { 'code' => '[FILTERED]' }, 'source' => { 'code' => '<%= puts 5 %>' } }
* | | | Refactor cookie_jar to decouple it from request objecteileencodes2015-07-051-7/+3
| |/ / |/| | | | | | | | | | | | | | This change decouples `cookie_jar` allocation from the request object. We need this for moving controller tests to integration tests so we can access the `cookie_jar` object separately.
* | | [ci skip] Improve the url_for documentationRoque Pinel2015-07-011-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify the `url_for` usage in mailers. Re-add the documentation about `url_for` and Route's path parameters, first introduced by 5c4f1859970d06228a0b67cad6d4486c1526ef2a. This was reported on #15097 and until it is decided to deprecate it or not, I believe the documentation should exist.
* | | Merge pull request #19431 from hmarr/head-routingRafael Mendonça França2015-06-221-1/+2
|\ \ \ | |/ / |/| | Respect routing precedence for HEAD requests
| * | Respect routing precedence for HEAD requestsHarry Marr2015-03-201-1/+2
| | | | | | | | | | | | | | | | | | | | | Fixes the issue described in #18764 - prevents Rack middleware from swallowing up HEAD requests that should have been matched by a higher-precedence `get` route, but still allows Rack middleware to respond to HEAD requests.
* | | Revert "Merge pull request #20584 from arthurnn/fix_url"Arthur Neves2015-06-171-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0b3397872582f2cf1bc6960960a6393f477c55e6, reversing changes made to 56d52e3749180e6c1dcf7166adbad967470aa78b. As pointed out on the PR, this will hide development mistakes too, which is not ideal.
* | | Merge pull request #20584 from arthurnn/fix_urlArthur Nogueira Neves2015-06-161-4/+8
|\ \ \ | | | | | | | | Catch InvalidURIError on bad paths on redirect.
| * | | Catch InvalidURIError on bad paths on redirect.Arthur Neves2015-06-161-4/+8
| | |/ | |/| | | | | | | | | | Handle URI::InvalidURIError errors on the redirect route method, so it wont raise a 500 if a bad path is given.
* / | Fix the comment about attr_reader of headers [ci skip]Mehmet Emin İNAÇ2015-06-161-1/+1
|/ /
* | remove `header=` on the response object.Aaron Patterson2015-06-152-13/+14
| | | | | | | | | | | | People should be free to mutate the header object, but not to set a new header object. That header object may be specific to the webserver, and we need to hide it's internals.
* | set the default charset in response initializeAaron Patterson2015-06-151-4/+12
| | | | | | | | | | this way we don't have to mutate the instance (as much) when writing a rack response
* | ActionDispatch::SSL should keep original header's behaviorFumiaki MATSUSHIMA2015-06-141-1/+1
| | | | | | | | | | | | `ActionDispatch::SSL` changes headers to `Hash`. So some headers will be broken if there are some middlewares on ActionDispatch::SSL and if it uses `Rack::Utils::HeaderHash`.
* | don't hold a reference to `env` in the options objectAaron Patterson2015-06-131-13/+11
| | | | | | | | | | I want to decouple Rails from the rack ENV as much as possible. We should try to keep as few references to the env as possible
* | Handle param-parsing errors from Rack in ExceptionWrapperGrey Baker2015-06-121-1/+3
| |
* | Revert changes related with api apps in RouteWrapperJorge Bejar2015-06-111-11/+1
| | | | | | | | | | See the following commit to have context about this change: https://github.com/rails/rails/commit/757a2bc3e3e52a5d9418656928db993db42b741b
* | Routes resources avoid :new and :edit endpoints if api_only is enabledJorge Bejar2015-06-112-12/+35
| |
* | Refactor internal? to query internal_controller? and internal_asset? methodsSantiago Pastorino2015-06-111-1/+11
| |
* | Remove Unneeded ApiPublicExceptions middleware, PublicExceptions already ↵Santiago Pastorino2015-06-111-46/+0
| | | | | | | | does the work
* | Adhere to Rails convention for private indentationSantiago Pastorino2015-06-111-21/+20
| |
* | Add ApiPublicException middlewareSantiago Pastorino2015-06-111-0/+47
| |
* | Change the `index` arg of `ActionDispatch::Static#new` to a kwargYuki Nishijima2015-06-111-4/+3
| |
* | remove unused codeAaron Patterson2015-06-081-2/+2
| |
* | we only care about methods that the request object responds toAaron Patterson2015-06-081-2/+1
| | | | | | | | | | matches? should only deal with methods on the request object, so lets just filter out anything that the request object doesn't respond to
* | extract required_defaults from the conditions hash before constructing the routeAaron Patterson2015-06-083-8/+8
| | | | | | | | | | this way we can remove the strange "respond_to?" conditional in the `matches?` loop
* | Add missing documentation for ActionDispatch::Request::Session [ci skip]Mehmet Emin İNAÇ2015-06-071-0/+33
| |
* | A few documentation tweaks [ci skip]Robin Dupret2015-06-071-2/+2
| | | | | | | | [Robin Dupret & Shunsuke Aida]
* | pass check_ip and proxies to GetIp constructorAaron Patterson2015-06-031-4/+4
| | | | | | | | | | The `GetIp` class doesn't need to keep a reference to the middleware, so there is no reason to pass the middleware instance to the `GetIp` class
* | Merge pull request #20383 from jonatack/fix-configurable-static-index-filenameSantiago Pastorino2015-06-021-3/+3
|\ \ | | | | | | Fix regression in #20017 wrong number of arguments error
| * | Fix regression in #20017: wrong number of arguments errorJon Atack2015-05-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and use coherent quoting/spacing. This should hopefully fix a regression that was introduced with #20017, causing deployment pushes to Heroku to be rejected with the following trace: ArgumentError: wrong number of arguments (2 for 3) remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tatic.rb:16:in `initialize' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/gem s/heroku-deflater-0.5.3/lib/heroku-deflater/serve_zipped_assets.rb:15:in `new' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/gem s/heroku-deflater-0.5.3/lib/heroku-deflater/serve_zipped_assets.rb:15:in `initialize' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tack.rb:43:in `new' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tack.rb:43:in `build' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tack.rb:118:in `block in build' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tack.rb:118:in `each' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tack.rb:118:in `inject' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/actionpack/lib/action_dispatch/middleware/s tack.rb:118:in `build' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/engine.rb:509:in `app' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/application/finisher.rb: 34:in `block in <module:Finisher>' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/initializable.rb:30:in `instance_exec' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/initializable.rb:30:in `run' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/initializable.rb:55:in `block in run_initializers' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/initializable.rb:54:in `run_initializers' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/vendor/bundle/ruby/2.2.0/bun dler/gems/rails-0ef7e73f0af7/railties/lib/rails/application.rb:352:in `initialize!' remote: /tmp/build_a3b8845b716508af12d99859d1a58c5c/config/environment.rb:5:in `<top (required)>'
* | | Merge pull request #20410 from schneems/schneems/boo-global-varsRafael Mendonça França2015-06-011-1/+1
|\ \ \ | | | | | | | | Use block variable instead of global