Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Assume JSON submissions are UTF-8
That is the default, and the only encoding I've ever seen anyone use in
the wild for JSON. The only other options are UTF-16 and UTF-32:

https://tools.ietf.org/html/rfc7159#section-8.1

It's highly unlikely anyone is using those, and they would need manual
hacking to accommodate anyway.
  • Loading branch information
jonjensen committed Jul 7, 2016
1 parent eeb3ea4 commit 17c71e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Vend/Server.pm
Expand Up @@ -24,7 +24,7 @@
package Vend::Server;

use vars qw($VERSION $Has_JSON);
$VERSION = '2.107';
$VERSION = '2.108';

use Cwd;
use POSIX qw(setsid strftime);
Expand Down Expand Up @@ -348,8 +348,8 @@ sub parse_cgi {
$CGI::post_ref = $h->{entity};
undef $CGI::json_ref;
eval {
$CGI::json_ref = JSON::from_json($$CGI::post_ref);
#::logDebug('json: %s', ::uneval($CGI::json_ref));
$CGI::json_ref = JSON::decode_json($$CGI::post_ref);
#::logDebug('json: %s', ::uneval($CGI::json_ref));

if ($Global::UnpackJSON && ref $CGI::json_ref eq 'HASH') {
@CGI::values{keys %$CGI::json_ref} = values %$CGI::json_ref;
Expand Down

0 comments on commit 17c71e3

Please sign in to comment.