This repository was archived by the owner on Jul 12, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-21
lines changed
Expand file tree Collapse file tree 2 files changed +3
-21
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ use Crypt::OpenSSL::RSA;
1414use URI::Escape;
1515use Data::Dumper;
1616use IO::All;
17+ use Encode qw( decode encode) ;
1718
1819$Net::OAuth::PROTOCOL_VERSION = Net::OAuth::PROTOCOL_VERSION_1_0A;
1920
@@ -321,14 +322,13 @@ sub _talk {
321322 my $request = Net::OAuth-> request(" protected resource" )-> new(%opts );
322323 my $private_key = Crypt::OpenSSL::RSA-> new_private_key($self -> cert);
323324 $request -> sign($private_key );
324-
325325 my $req = HTTP::Request-> new($method , $request -> to_url);
326326
327327 # $req->header(Authorization => $request->to_authorization_header);
328328 if ($hash ) {
329329 # $req->content('xml=' . uri_escape($self->_template($hash)));
330330 # $req->header('Content-Type' => 'application/x-www-form-urlencoded; charset=utf-8');
331- $req -> content($self -> _template($hash ));
331+ $req -> content(encode( ' UTF-8 ' , $self -> _template($hash ) ));
332332 $req -> header(' Content-Type' => ' form-data' );
333333 }
334334
@@ -342,7 +342,7 @@ sub _talk {
342342 }
343343 else {
344344 # warn "Something went wrong: " . $res->status_line;
345- $self -> error($res -> status_line . " " . $res -> content);
345+ $self -> error($res -> status_line . " " . $res -> content);
346346 }
347347
348348 return ;
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments