Subject: | SOAP::WSDL::Server::Mod_Perl2 should return Content-Length |
The mod_perl handler get a whole xml response string from handle()
method. So he gets already the whole answer and therefore knows
about its length.
Returning this as Content-Length prevents some potential problems
that may be caused otherwise. When Content-Length is not provided
Apache return a response with Transfer-Encoding: chunked.
The following patch add a Content-Length to the response.
Index: Mod_Perl2.pm
===================================================================
--- Mod_Perl2.pm (revision 866)
+++ Mod_Perl2.pm (working copy)
@@ -100,6 +100,7 @@
if ($response_msg) {
$r->content_type('text/xml; charset="utf-8"');
+ $r->headers_out->add('Content-Length' => length($response_msg));
$r->print($response_msg);
return Apache2::Const::OK;
}