Finn Isaac Norris Colman created THRIFT-5532:
------------------------------------------------
Summary: Perl Thrift/HttpClient.pm headers bug
Key: THRIFT-5532
URL: https://issues.apache.org/jira/browse/THRIFT-5532
Project: Thrift
Issue Type: Bug
Components: Perl - Library
Affects Versions: 0.16.0, 0.14.2, 0.14.1, 0.15.0, 0.14.0, 0.13.0, 0.12.0
Reporter: Finn Isaac Norris Colman
When using the Perl library with the Thrift/HttpClient.pm the following error
occurs:
'Can\'t call method "clone" on unblessed reference at
/usr/share/perl5/HTTP/Message.pm line 40, <GEN2> line 1.
'
This is happening because of these lines of code in Thrift/HttpClient.pm:
[https://github.com/apache/thrift/blob/79f89e0cec046ae7e6ed4a31ccfadd907be8baed/lib/perl/lib/Thrift/HttpClient.pm#L189-L190]
The HTTP::Request package expects the headers to either be an {{HTTP::Headers}}
object or a plain array reference of key/value pairs.
But here we are instead passing a hash reference which is incorrect.
This bug was introduced back in 2018 with this refactoring PR:
[https://github.com/apache/thrift/commit/8a130f63e5bd09e5c39f9760ba04b5ea0837ff4c]
In the process the correct setting of the headers was lost.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)