| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
This commit allows us to use one request object rather than allocating
multiple request objects to deal with the session.
|
| |
| |
| |
| |
| | |
We're going to implement storing env values differently in the future,
so let's disconnect these methods from the instance variables
|
| | |
|
| |
| |
| |
| | |
we're already doing this with a bunch of other header data.
|
| |
| |
| |
| | |
we have a method that knows how to get rack.input, so lets use that.
|
| |
| |
| |
| |
| |
| | |
We need to abstract the internals of the request object away from this
instance variable so that the values for `@env` can be calculated in a
different way.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This refactoring moves the controller class name that was on the route
set to the request. The purpose of this refactoring is for changes we
need to move controller tests to integration tests, mainly being able to
access the controller on the request instead of having to go through
the router.
[Eileen M. Uchitelle & Aaron Patterson]
|
| | |
|
| |
| |
| |
| |
| |
| | |
people should be accessing request information through the request
object, not via the env hash. If they really really want at the env
hash, then they can get it off the request.
|
| |
| |
| |
| |
| |
| |
| | |
Actions are processed through `dispatch`, so they should have the
request set on them before any user land code can be executed. Lets
stop setting _env on the controller, and give access to it through the
`env` method.
|
| |
| |
| |
| |
| | |
this is another place that we should stop directly accessing the env
hash and let the request object take care of that for us
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
again, we want to hide the contents of `env` from the implementation.
Allocate a request object to access the contents of env, but save
allocations due to string literal allocations when accessing the env
hash.
|
| |
| |
| |
| |
| | |
hide the env key in the request object so that other code doesn't need
to know.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
This decouples the `call` method from knowing the SCRIPT_NAME key and
offloads decisions about how to access script_name
|
| |
| |
| |
| |
| | |
Now that we have encoding strategies, we can just walk the params hash
once to encode as HWIA, and remove nils.
|
| |
| |
| |
| | |
[Robin Dupret & Shunsuke Aida]
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
add missing dot to end of the doc
|
| | |
|
| |
| |
| |
| | |
I should have deleted this earlier with 42e66fac38b54dd53d062fb5d3376218ed2ffdae
|
| |
| |
| |
| | |
this way we can keep the knowledge of `env` hash keys in one place.
|
|/
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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`).
|
| |
|
|
|
|
| |
ActionDispatch::Request#request_id
|
| |
|
|
|
|
|
| |
encapsulate env in the request so that we can eventually move away from
the env hash
|
|
|
|
| |
this will help decouple us from using the rack env hash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Related with #11795.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|