You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2022/03/01 22:22:00 UTC

[jira] [Resolved] (THRIFT-5532) Perl Thrift/HttpClient.pm headers bug

     [ https://issues.apache.org/jira/browse/THRIFT-5532?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Geyer resolved THRIFT-5532.
--------------------------------
    Fix Version/s: 0.17.0
         Assignee: Finn Isaac Norris Colman
       Resolution: Fixed

> 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.12.0, 0.13.0, 0.14.0, 0.15.0, 0.14.1, 0.14.2, 0.16.0
>            Reporter: Finn Isaac Norris Colman
>            Assignee: Finn Isaac Norris Colman
>            Priority: Major
>             Fix For: 0.17.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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. The super class HTTP::Message expects the same.
> 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#diff-c1101ee9588204db1c3ab744b4f50c932bf86c3ad4bef129b6a0a8a1e222bb98L187-L188]
> In the process the correct setting of the headers was lost.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)