aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http/request.rb
Commit message (Collapse)AuthorAgeFilesLines
...
* | A few documentation tweaks [ci skip]Robin Dupret2015-06-071-2/+2
| | | | | | | | [Robin Dupret & Shunsuke Aida]
* | Remove already defined methods in super class of ActionDispatch::Request classMehmet Emin İNAÇ2015-05-281-36/+0
| | | | | | | | | | | | | | These methods had defined in 2004 by dhh in initial commit and `ActionDispatch::Request` class has been inherited from `Rack::Request` class in 2009 by josh. In 2014 these methods and more of them defined in `Rack::Request` class so we don't need them anymore in rails codebase.
* | Documentation for ActionDispatch::Request form_data? method [ci skip]Mehmet Emin İNAÇ2015-05-271-0/+2
| |
* | Add missing nodocs and docs for ActionDispatch::Request [ci skip]Mehmet Emin İNAÇ2015-05-261-3/+5
| | | | | | | | add missing dot to end of the doc
* | Use memoization while accessing request headers for minimizing memory usageMehmet Emin İNAÇ2015-05-251-1/+1
| |
* | remove useless ivarAaron Patterson2015-05-231-1/+0
| | | | | | | | I should have deleted this earlier with 42e66fac38b54dd53d062fb5d3376218ed2ffdae
* | move request id manipulation to the request objectAaron Patterson2015-05-221-1/+13
| | | | | | | | this way we can keep the knowledge of `env` hash keys in one place.
* | Fix method signature of `parse_query` to match rackeileencodes2015-04-061-1/+1
|/ | | | | | | Recently rack was changed to have a second argument on the `parse_query` method (in rack/rack#781). Rails relies on this and it's `parse_query` method was complaining about missing the second argument. I changed the arguments to `*` so we don't have this issue in the future.
* ask the routes objects for its Rack env keyAaron Patterson2015-03-021-1/+1
| | | | | | this centralizes the logic for determining the script name key and drops object allocations when calling `engine_script_name` (which is called on each `url_for`).
* Prefer request_id over uuid and test the aliasRafael Mendonça França2015-02-201-4/+4
|
* Aliased the ActionDispatch::Request#uuid method with ↵David Ilizarov2015-02-201-0/+2
| | | | ActionDispatch::Request#request_id
* Remove deprecated `ActionDispatch::Request#deep_munge`Rafael Mendonça França2015-01-041-9/+0
|
* stop referencing `env` in url_forAaron Patterson2014-12-301-0/+4
| | | | | encapsulate env in the request so that we can eventually move away from the env hash
* use methods on the request rather than direct hash accessAaron Patterson2014-12-301-0/+8
| | | | this will help decouple us from using the rack env hash
* edit pass over all warningsXavier Noria2014-10-281-1/+1
| | | | | | | | | | | | | | | This patch uniformizes warning messages. I used the most common style already present in the code base: * Capitalize the first word. * End the message with a full stop. * "Rails 5" instead of "Rails 5.0". * Backticks for method names and inline code. Also, converted a few long strings into the new heredoc convention.
* Request#check_method no longer breaks when :en is not available localeStefan Henzen2014-10-091-1/+1
| | | | | | | | Request#check_method would use to_sentence(locale: :en), which breaks when I18n.available_locales does not include :en and I18n.enforce_available_locales is true (default). Inlined to_sentence functionality to solve this.
* Rescue Rack::Utils::ParameterTypeError instead of TypeErrorYuki Nishijima2014-09-131-2/+2
| | | | | | | | As of rack/rack@167b6480235ff00ed5f355698bf00ec2f250f72e, Rack raises Rack::Utils::ParameterTypeError which inherits TypeError. In terms of the behavior, Rescuing TypeError still works but this method shouldn't rescue if TypeError is raised for other reasons.
* Avoid duplicating routes for HEAD requests.Guo Xiang Tan2014-08-211-0/+6
| | | | | | | | Follow up to rails#15321 Instead of duplicating the routes, we will first match the HEAD request to HEAD routes. If no match is found, we will then map the HEAD request to GET routes.
* Protect against error when parsing parameters with Bad RequestRafael Mendonça França2014-08-191-2/+2
| | | | Related with #11795.
* use 'based on' instead of 'based off' [ci skip]Akshay Vishnoi2014-08-121-1/+1
|
* LOCALHOST definition should match any 127.0.0.0/8 addressEarl J St Sauver2014-07-181-1/+1
| | | | | | | | | | | | | | | The entire 127.0.0.0/8 range is assigned to the loopback address, not only 127.0.0.0/24. This patch allows ActionDispatch::Request::LOCALHOST to match any IPv4 127.0.0.0/8 loopback address. The only place that the #local? method was previously under test was in the show_expectations_test.rb file. I don't particularly like that that's implicitly where this code is under test, and I feel like I should move some of that testing code into the test/dispatch/request_test.rb file, but I wanted some feedback first. Credit goes to @sriedel for discovering the issue and adding the patch.
* makes it sound less misleadingShunsukeAida2014-07-021-2/+2
|
* Merge pull request #15349 from tgxworld/remove_duplicated_method_callRafael Mendonça França2014-06-031-2/+2
|\ | | | | Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
| * Remove duplicated HashWithIndifferentAccess#with_indifferent_access.Guo Xiang Tan2014-05-261-2/+2
| |
* | move path_parameter encoding check to the request objectAaron Patterson2014-05-271-0/+11
|/
* Add RFC4791 MKCALENDAR methodkasper2014-05-151-1/+3
|
* [ci skip] Add documentation for original_fullpath.Lauro Caetano2014-03-111-0/+7
|
* Change deep_munge call to avoid deprecation warningCarlos Antonio da Silva2013-12-031-2/+2
|
* Deep Munge the parameters for GET and POSTMichael Koziarski2013-12-021-2/+2
| | | | | | | | 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
* :scissors: [ci skip]Carlos Antonio da Silva2013-11-041-3/+0
|
* Code style for privacy indentionDavid Heinemeier Hansson2013-11-031-8/+8
|
* Ensure backwards compability after the #deep_munge extractionDavid Heinemeier Hansson2013-11-031-0/+10
|
* Normalize file parameters in same place as other parameters ↵robertomiranda2013-08-141-1/+0
| | | | (ActionDispatch::Http::Parameters#normalize_encode_params)
* Use helper method to get ENV['CONTENT_LENGTH']Paul Nikitochkin2013-07-081-1/+1
|
* Extract ActionDispatch::Request#deep_mungeGenadi Samokovarov2013-05-301-17/+2
| | | | | | | | | 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.
* Remove mentions of "app" from http request docs [ci skip]Carlos Antonio da Silva2013-03-191-12/+10
|
* UTF-8 encode all keys and values in nested params hash.Teo Hui Ming2013-03-151-2/+2
|
* Add extra clarifying line in docs. [ci skip]Steve Klabnik2013-03-131-0/+1
|
* Fix docs: response -> request.Steve Klabnik2013-03-131-2/+2
| | | | Even though I read it carefully, my brain tricked me. :cry:
* Add documentation to ActionDispatch::RequestGareth Rees2013-03-131-0/+16
|
* adding missing requiresAaron Patterson2013-01-091-0/+8
|
* * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * ↵Aaron Patterson2013-01-081-3/+4
| | | | | | | | | | | | 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-081-4/+3
| | | | | This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing changes made to f049016cd348627bf8db0d72382d7580bf802a79.
* * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * ↵Aaron Patterson2013-01-071-3/+4
| | | | | | | | | | | | 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
* Needless requiresAkira Matsuda2013-01-061-4/+0
|
* Fix rewinding in ActionDispatch::Request#raw_postMatt Venables2012-12-111-2/+3
| | | | | | | | | If env['RAW_POST_DATA'] is nil, #raw_post will attempt to set it to the result of #body (which will return env['rack.input'] if env['RAW_POST_DATA'] is nil). #raw_post will then attempt to rewind the result of another call to #body. Since env['RAW_POST_DATA'] has already been set, the result of #body is not env['rack.input'] anymore. This causes env['rack.input'] to never be rewound.
* give access to the original exception raised in case of a parse errorAaron Patterson2012-10-251-2/+2
|
* do not lose backtrace information from the raised exceptionAaron Patterson2012-10-251-10/+6
|
* eagerly populate the http method loookup cache so we don't need locksAaron Patterson2012-10-181-1/+7
|
* Properly reset the session on reset_sessionSteve Klabnik2012-08-311-2/+5
| | | | Fixes #7478