summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Colman <finn.colman@modicagroup.com>2022-03-01 15:59:34 +1300
committerJens Geyer <Jens-G@users.noreply.github.com>2022-03-01 23:20:50 +0100
commit8ab86c3303a8157ecfed6ff588d71e6e13dd7017 (patch)
tree12f00b1da5ee4372ba7527cd519cdd1a63a31ff9
parent79f89e0cec046ae7e6ed4a31ccfadd907be8baed (diff)
downloadthrift-8ab86c3303a8157ecfed6ff588d71e6e13dd7017.tar.gz
Fix headers bug in Thrift/HttpClient.pm
-rw-r--r--lib/perl/lib/Thrift/HttpClient.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/perl/lib/Thrift/HttpClient.pm b/lib/perl/lib/Thrift/HttpClient.pm
index 40ec9ce20..3513a08a8 100644
--- a/lib/perl/lib/Thrift/HttpClient.pm
+++ b/lib/perl/lib/Thrift/HttpClient.pm
@@ -186,7 +186,8 @@ sub flush
$out->setpos(0); # rewind
my $buf = join('', <$out>);
- my $request = HTTP::Request->new(POST => $self->{url}, ($self->{headers} || undef), $buf);
+ my $request = HTTP::Request->new(POST => $self->{url}, undef, $buf);
+ map { $request->header($_ => $self->{headers}->{$_}) } keys %{$self->{headers}};
my $response = $ua->request($request);
my $content_ref = $response->content_ref;