diff options
author | Finn Colman <finn.colman@modicagroup.com> | 2022-03-01 15:59:34 +1300 |
---|---|---|
committer | Jens Geyer <Jens-G@users.noreply.github.com> | 2022-03-01 23:20:50 +0100 |
commit | 8ab86c3303a8157ecfed6ff588d71e6e13dd7017 (patch) | |
tree | 12f00b1da5ee4372ba7527cd519cdd1a63a31ff9 | |
parent | 79f89e0cec046ae7e6ed4a31ccfadd907be8baed (diff) | |
download | thrift-8ab86c3303a8157ecfed6ff588d71e6e13dd7017.tar.gz |
Fix headers bug in Thrift/HttpClient.pm
-rw-r--r-- | lib/perl/lib/Thrift/HttpClient.pm | 3 |
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; |