Subject: | RT::Client::REST::_submit doesn't update HTTP::Message object $res |
Hi,
RT::Client::REST::_submit seems to have been broken since 0.35 : $res
content is not updated as $res->decoded_content($text) doesn't SET the
content (see HTTP::Message documentation). The content is then
unmodified, which means that the first lines (RT status code) are not
deleted.
We should use $res->content($text) instead (that's the case in 0.34) ;
however it doesn't work either as $text seems to be in Perl's internal
form and not in bytes form (as it has to be for content()). That's why
we have to use Encode::encode.
Here is the patch for RT/Client/REST.pm :
499c499
< $res->decoded_content($text);
---
Show quoted text
> $res->content(Encode::encode("utf8", $text));
I'm not sure it works if the RT website is not encoded in utf-8.
Thanks for this distribution !
* Distribution name : RT-Client-REST-0.35
* Perl version : This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
* OS : Linux novembre 2.6.24-1-686 #1 SMP Thu Mar 27 17:45:04 UTC 2008
i686 GNU/Linux