Reputation: 19
I am getting the following errors:
[Fri Feb 19 08:55:41 2016] [error] [client 172.16.30.100] FastCGI: server "/home/admin/soap/server.fcgi" stderr: HTTP::Message content must be bytes at /usr/local/lib/perl5/site_perl/5.8.9/SOAP/Transport/HTTP.pm line 317
[Fri Feb 19 08:55:41 2016] [error] [client 172.16.30.100] FastCGI: incomplete headers (0 bytes) received from server "/home/admin/soap/server.fcgi" [Fri Feb 19 08:55:41 2016] [warn] FastCGI: server "/home/admin/soap/server.fcgi" (pid 45466) terminated by calling exit with status '255'
Here is line 317 of HTTP.pm I appreciate any input on a fix.
$self->response(HTTP::Response->new(
$code => undef,
HTTP::Headers->new(
'SOAPServer' => $self->product_tokens,
$compressed ? (
'Content-Encoding' => $COMPRESS) : (),
'Content-Type' => join(
'; ',
'text/xml',
!$SOAP::Constants::DO_NOT_USE_CHARSET && $encoding ? 'charset=' . lc($encoding) : ()
),
'Content-Length' => SOAP::Utils::bytelength $response),
$response,
));
$self->response->headers->header('Content-Type' => 'Multipart/Related; type="text/xml"; start="<main_envelope>"; boundary="'.$is_multipart.'"') if $is_multipart; }
Upvotes: 0
Views: 658
Reputation: 22421
Error message is pretty much telling you all about it: content for HTTP::Response
object that you provide with $response
variable must be bytes - i.e. a buffer without any characters outside 0-255 range. Use Encode::encode
to transform it from Perl internal representation to whatever encoding required for your protocol.
By the way, this has nothing to do with fastcgi
. The first error cause the script to die without emitting a response, resulting in the second error message.
Upvotes: 1