| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
|
|
|
|
|
|
| |
Related with 38d2bf5fd1f3e014f2397898d371c339baa627b1.
cc @tenderlove
|
|
|
|
|
| |
This will keep our current API working without having the users to
change their codebases.
|
| |
|
|
|
|
|
|
| |
we don't actually need a param parser middleware instance since the
request object will take care of parsing parameters for us. For now,
we'll just configure the parameter parsers on the request in this class.
|
|
|
|
|
|
|
|
| |
The middleware stack is a singleton in the application (one instance is
shared for the entire application) which means that there was only one
opportunity to set the parameter parsers. Since there is only one set
of parameter parsers in an app, lets just configure them on the request
class (since that is where they are used).
|
|
|
|
|
| |
Parameters will not be parsed until they are specifically requested via
the `request_parameters` method.
|
|
|
|
|
| |
`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
|
|
|
|
|
| |
All parameter parsing should be on the request object because the
request object is the object that we ask for parameters.
|
|
|
|
|
| |
I want to implement this with something besides `@env` in the future, so
lets stop directly referencing it.
|
| |
|
|
|
|
|
| |
this is another place that we should stop directly accessing the env
hash and let the request object take care of that for us
|
|
|
|
|
| |
Now that we have encoding strategies, we can just walk the params hash
once to encode as HWIA, and remove nils.
|
|
|
|
|
| |
pass in the instance variable to start decoupling the meat of the parser
from the instance of the middleware
|
|
|
|
|
| |
We will always make an assignment to the env hash and eliminate a
conditional
|
|
|
|
|
| |
If we only deal with proc objects, then we can eliminate type checking
in the parameter parsing middleware
|
|
|
|
|
| |
Unlike ShowExceptions or PublicExceptions, ParamsParser shouldn't
transform exceptions like Interrupt and NoMemoryError into ParserError.
|
|
|
|
|
|
|
|
| |
In order to get raw_post to be not empty after
ParamsParser#parse_formatted_parameters,
added rewinding of body stream input on parsing json params.
Closes #11345
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
If you want an ability to parse XML parameters, please install
`actionpack-xml_parser` gem.
|
|
|
|
| |
Fixes #8845.
|
|
|
|
|
| |
If you revert this commit, I will hunt you down, I will make you regret
ever terrible thing you've ever done, I will make you suffer.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This reverts commit 88cc1688d0cb828c17706b41a8bd27870f2a2beb, reversing
changes made to f049016cd348627bf8db0d72382d7580bf802a79.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
original exception.
|
| |
|
|
|
|
| |
parsing request params.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
[#4437 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
|
|
|
|
| |
Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Rack::Request expect
it to return a String. Split the Rails API so that Request#content_type returns
a String, and Request#content_mime_type returns a Mime::Type object.
|
|
|
|
|
|
|
|
|
|
|
|
| |
add lazy_load_hooks.rb, which allows us to declare code that
should be run at some later time. For instance, this allows
us to defer requiring ActiveRecord::Base at boot time purely
to apply configuration. Instead, we register a hook that should
apply configuration once ActiveRecord::Base is loaded.
With these changes, brings down total boot time of a
new app to 300ms in production and 400ms in dev.
TODO: rename base_hook
|
|
|
|
|
|
|
|
|
|
| |
AS Xml and Json parsers expect the request body to be a real IO object
supporting methods like getc or ungetc which are not specified by the
Rack spec and aren't supported by Passenger or the Rewindable input
wrapper.
We can restore functionality if the AS parsers are rewritten to support
Racks subset of supported IO methods.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
information when invalid xml or json is posted
[#2481 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
|
|
|
|
| |
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
|
|
|
|
|
| |
state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
|
| |
|
| |
|