Decoding utf-8 encoded parameters #2

Merged
merged 2 commits into from Aug 2, 2012

Conversation

Projects
None yet
2 participants

losomo commented Jul 31, 2012

WebNano encodes the message body to utf8, which is fine. However, the behavior should become symmetric, i.e. decoding request parameters in Plack::Request. The same operation in Tatsumaki framework looks like this: https://metacpan.org/source/MIYAGAWA/Tatsumaki-0.1013/lib/Tatsumaki/Request.pm

Since WebNano doesn't subclass Plack::Request, I am decoding the parameters just after creating the Plack::Request object.

Without this modification, applications would have to decode all parameters all over the place whenever they are used.

Owner

zby commented Jul 31, 2012

Thanks for the patch! Sounds reasonable - let me sleep with it and test it with Nblog. Could you add some tests as well?

Cheers,
Zbigniew

losomo commented Jul 31, 2012

Good idea. They are included.

zby added a commit that referenced this pull request Aug 2, 2012

Merge pull request #2 from losomo/master
Decoding utf-8 encoded parameters

@zby zby merged commit 0221962 into zby:master Aug 2, 2012

Owner

zby commented Aug 2, 2012

Thanks again! By the way it also need some documentation. I am going on vacations tomorrow - so don't expect quick responses.

Cheers,
Zbigniew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment