Skip to content

Commit

Permalink
fix: fix sent json utf-8 double encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
g-bougard committed Jan 26, 2022
1 parent ef06ac1 commit 2559b0b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/GLPI/Agent/HTTP/Client/GLPI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use English qw(-no_match_vars);
use HTTP::Request;
use UNIVERSAL::require;
use URI;
use Encode;

use GLPI::Agent::Tools;
use GLPI::Agent::Logger;
Expand Down Expand Up @@ -92,7 +91,7 @@ sub send { ## no critic (ProhibitBuiltinHomonyms)
my $request_content = $message->getContent();
$logger->debug2(_log_prefix . "sending message:\n$request_content");

$request_content = $self->_compress(encode('UTF-8', $request_content));
$request_content = $self->_compress($request_content);
unless ($request_content) {
$logger->error(_log_prefix . 'inflating problem');
return;
Expand Down

0 comments on commit 2559b0b

Please sign in to comment.