New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encoding of body_params vs param/params #1192
Comments
Looking at code and tests (t/dsl/parameters.t) this actually looks intentional though I have not (yet) found anything in the docs that mentions this difference. @PerlDancer (especially @xsawyerx) I've been hunting through the various issues and PR #988 but I can't find any discussion or explanation for this particular difference between params and parameters. Can anyone help enlighten us? |
See issue #1192. @veryrusty said: I suspect the param encoding change was a regression. When the request object became a subclass of Plack::Request, we used the existing body_params methods from Plack::Request. They do not decode params. Whereas Dancer(2) always has decoded params. Decoding *is* the correct thing to be doing (IMHO).
See issue #1192. @veryrusty said: I suspect the param encoding change was a regression. When the request object became a subclass of Plack::Request, we used the existing body_params methods from Plack::Request. They do not decode params. Whereas Dancer(2) always has decoded params. Decoding *is* the correct thing to be doing (IMHO).
See issue #1192. @veryrusty said: I suspect the param encoding change was a regression. When the request object became a subclass of Plack::Request, we used the existing body_params methods from Plack::Request. They do not decode params. Whereas Dancer(2) always has decoded params. Decoding *is* the correct thing to be doing (IMHO).
Fixed in 1d62e51. Closing. |
[ BUG FIXES ] * Fix memory leak in plugins. (Sawyer X) * GH #1180, #1220: Revert (most of) GH #1120. Change back to using MooX::Types::MooseLike until issues around Type::Tiny are resolved. Peter (@SysPete) Mottram * GH #1192: Decode body|query|request_parameters (Peter Mottram) * GH #1224: Plugins defined with :PluginKeyword attribute are now exported. (Yanick Champoux) * GH #1226: Plugins can now call the DSL of the app via $self->dsl (Sawyer X) [ ENHANCEMENTS ] * PR #1223: Add YAML::XS to Recommends (Peter Mottram) * PR #1117: If installed, use HTTP::XSCookies and all cookie operations will be faster (Peter Mottram) * PR #1228: Allow register_plugin() to pass @_ properly (Sawyer X) * PR #1231: Plugins can now call the syntax of plugins they loaded (Sawyer X) [ DOCUMENTATION ] * PR #1151: Note that config is immutable after first read (Peter Mottram) * PR #1222: Update list of files generated by `dancer2 -a`, make name of sample app consistent (Daniel Perrett)
Dancer2 v0.200001
config.yml has
charset: "UTF-8"
set.When doing
params
returnsand
body_parameters
returnsWhen doing a
map { Encode::decode( "utf-8", $_) }
on that I get the decoded version.I tracked
params
down to Request.pm:312:$self->_params
which is initialized in line 460 with$self->_body_params
wich does a_decode
in line 125.And
body_parameters
in Request.pm:368:return $self->env->{'plack.request.body'}
.I am rather unskilled with providing good information. So if I should provide more (which?) information, please say so!
The text was updated successfully, but these errors were encountered: