| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
we need to be more specific about exception handling when dealing with
the parse strategies. The calls to `return yield` can also raise an
exception, but we don't want to handle that in *this* code.
|
|
|
|
|
| |
`normalize_encode_params` is common to all parser code paths, so we can
pull that up and always apply it before assigning the request parameters
|
|
|
|
|
| |
since there is only one "default" strategy now, we can just use the
block parameter for that.
|
|
|
|
|
| |
All parameter parsing should be on the request object because the
request object is the object that we ask for parameters.
|
|
|
|
| |
this commit removes some direct access to `env`.
|
|
|
|
|
|
| |
Just include the modules necessary in the Request object to implement
the things we need. This should make it easier to build delegate
request objects because the API is smaller
|
|\
| |
| | |
[ci skip] Added localhost IPv6
|
| | |
|
| | |
|
|/
|
|
|
|
|
|
| |
Cleanup for `ActionDispatch::Http::Parameters` - no need for required libraries
and remove not used private method.
Apparently this method was used in `ActionDispatch::Http::Request` - fixed
by calling `Request::Utils` explicitly (as was done in other parts of the codebase)
|
|
|
|
|
| |
now the caller can just treat it like a regular controller even though
it will return a 404
|
| |
|
| |
|
|
|
|
|
| |
I want to implement this with something besides `@env` in the future, so
lets stop directly referencing it.
|
|
|
|
|
| |
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.
|