aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/params_parser.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix deprecation warning for ParamsParser instance :smile:Prathamesh Sonpatki2016-03-301-1/+1
|
* Deprecate ActionDispatch::ParamsParser instance.Rafael Mendonça França2016-03-301-0/+1
| | | | | | Related with 38d2bf5fd1f3e014f2397898d371c339baa627b1. cc @tenderlove
* Transform the mime object to symbol when registering the parsersRafael Mendonça França2016-02-221-0/+1
| | | | | This will keep our current API working without having the users to change their codebases.
* Deprecate exception#original_exception in favor of exception#causeYuki Nishijima2015-11-031-4/+18
|
* do not instantiate a param parser middlewareAaron Patterson2015-09-181-6/+2
| | | | | | 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.
* push the parameter parsers on to the classAaron Patterson2015-09-181-12/+2
| | | | | | | | 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).
* stop eagerly parsing parametersAaron Patterson2015-09-181-2/+0
| | | | | Parameters will not be parsed until they are specifically requested via the `request_parameters` method.
* pull `normalize_encode_params` upAaron Patterson2015-09-181-2/+1
| | | | | `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
* move parameter parsing to the request objectAaron Patterson2015-09-181-21/+3
| | | | | All parameter parsing should be on the request object because the request object is the object that we ask for parameters.
* stop using `@env` in the GET / POST methodsAaron Patterson2015-08-241-2/+4
| | | | | I want to implement this with something besides `@env` in the future, so lets stop directly referencing it.
* Cleanup ActionDispatch:ParamsParserMarcin Olichwirowicz2015-08-171-2/+11
|
* refactor param parsing middleware to use request objectsAaron Patterson2015-08-071-10/+9
| | | | | this is another place that we should stop directly accessing the env hash and let the request object take care of that for us
* rm `deep_munge`. You will live on in our hearts (and git history)Aaron Patterson2015-07-211-1/+1
| | | | | Now that we have encoding strategies, we can just walk the params hash once to encode as HWIA, and remove nils.
* 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
* Do not rescue Exception in ParamsParserYuki Nishijima2014-11-231-1/+1
| | | | | Unlike ShowExceptions or PublicExceptions, ParamsParser shouldn't transform exceptions like Interrupt and NoMemoryError into ParserError.
* Use Request#raw_post instead Request#bodyPaul Nikitochkin2013-07-081-1/+1
| | | | | | | | 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
* Extract ActionDispatch::Request#deep_mungeGenadi Samokovarov2013-05-301-1/+1
| | | | | | | | | 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 XML Parser from ActionDispatchPrem Sichanugrist2013-02-201-23/+3
| | | | | If you want an ability to parse XML parameters, please install `actionpack-xml_parser` gem.
* Fix json params parsing regression for non-object JSON content.Dylan Smith2013-01-111-2/+2
| | | | Fixes #8845.
* remove yaml as a param parser :burn:Aaron Patterson2013-01-081-2/+0
| | | | | 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.
* * Strip nils from collections on JSON and XML posts. [CVE-2013-0155] * ↵Aaron Patterson2013-01-081-2/+2
| | | | | | | | | | | | 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-2/+2
| | | | | 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-2/+2
| | | | | | | | | | | | 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
* Make ActionDispatch::ParamsParser::ParseError#original_exception return the ↵Szymon Nowak2012-08-271-4/+10
| | | | original exception.
* Fix ActionDispatch::ParamsParser::ParseError message for XML and JSON parsers.Szymon Nowak2012-08-241-4/+2
|
* Raise generic ParseError exception when ActionDispatch::ParamsParser fails ↵Szymon Nowak2012-08-241-2/+5
| | | | parsing request params.
* Action pack logger methodschanged to active supoort Logger methodsKarunakar (Ruby)2011-12-221-1/+1
|
* middlewares should use logger from envlest2011-11-251-3/+3
|
* Remove unreachable code, and add additional testcases.kennyj2011-11-241-6/+1
|
* Fix parsing xml input by ActionDispatch::ParamsParserLawrence Pit2010-05-061-1/+1
| | | | | | [#4437 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Some require indifferent_access addedSantiago Pastorino2010-04-211-0/+1
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* require without .rbSantiago Pastorino2010-04-211-1/+1
| | | | Signed-off-by: Xavier Noria <fxn@ubuntu.(none)>
* Missing require addedSantiago Pastorino2010-04-181-0/+1
|
* Use request.body IO and rewind, if possibleJeremy Kemper2010-04-071-3/+6
|
* Remove #size call on rack input ioJoshua Peek2010-04-071-8/+4
|
* Request#content_type exists in Rack::Request, and other parts of ↵wycats2010-03-281-2/+4
| | | | | | 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.
* Make many parts of Rails lazy. In order to facilitate this,wycats2010-03-071-1/+0
| | | | | | | | | | | | 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
* Revert streaming params parser support.Joshua Peek2010-01-191-3/+3
| | | | | | | | | | 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.
* All AD modules are "deferrable"Joshua Peek2009-12-221-0/+1
|
* Just a little tidyingDavid Heinemeier Hansson2009-12-201-24/+22
|
* Move legacy param_parsers config onto AD::ParamsParserJoshua Peek2009-08-211-5/+7
|
* Adding a call to logger from params_parser to give detailed debug ↵Jay Pignata2009-08-151-0/+6
| | | | | | | | information when invalid xml or json is posted [#2481 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Allow ParamsParser to parse YAML from the request body IO directlyBrian Lopez2009-05-171-1/+1
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Add support for parsing XML and JSON from an IO as well as a string [#2659 ↵Brian Lopez2009-05-171-5/+3
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Switch to action_dispatch rack namespace Joshua Peek2009-04-301-1/+1
|
* Opt in to JSONJeremy Kemper2009-04-221-0/+2
|
* Move HTTP libs and middleware into ActionDispatch componentJoshua Peek2009-01-271-0/+71