libwww-perl-5.810 (HTTP::Message content not bytes)
am 14.04.2008 20:21:20 von mailinglists------=_NextPart_000_00C5_01C89E21.AB886050
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
"Don't allow HTTP::Message content to be set to Unicode strings."
I'm going to assume this change above is whats breaking my scripts. My
script is using NicToolServerAPI.pm which in turn uses LWP::UserAgent. The
script dies out with the error above when I run it. I'm not sure what has
to be done, my guess is that the script is POST'ing the URL in plain text
and it needs to be in some other format. I've snipped out a few pieces of
code in hopes that somebody here might be able to give me a quick fix.
===NicToolServerAPI.pm Snip calling LWP::UserAgent====
my $ua = new LWP::UserAgent;
my $req = HTTP::Request->new('POST',$url);
===NicToolServerAPI.pm snip setting $url====
sub send_request {
my $self = shift;
my $url;
if ($NicToolServerAPI::use_https_authentication) {
$url = 'https://'.$NicToolServerAPI::server_host.':'
..$NicToolServerAPI::https_server_port;
} else {
$url = 'http://'.$NicToolServerAPI::server_host.':'
..$NicToolServerAPI::server_port;
}
my $func = 'send_'.$NicToolServerAPI::data_protocol.'_request';
if ($self->can($func)) {
return $self->$func($url,@_);
} else {
return {'error_code'=>501,'error_msg'=>'Data protocol not supported:
'.$NicToolServerAPI::data_protocol};
}
}
Anybody know what I need to do to convert $url to bytes? Is this just a
base64 encode or something?
~Shaun
------=_NextPart_000_00C5_01C89E21.AB886050--