Merge branch 'patch-1' of https://github.com/rekky/BeSimpleSoap into rekky-patch-1

This commit is contained in:
Francis Besset 2013-10-30 16:51:54 +01:00
commit 4a97c2537e
1 changed files with 9 additions and 2 deletions

View File

@ -54,9 +54,16 @@ class SoapResponse extends CommonSoapResponse
header('Content-Type: ' . $this->getContentType());
// get content to send
$response = $this->getContent();
// set Content-Length header
header('Content-Length: '. strlen($response));
if (function_exists('mb_strlen')) {
$length = mb_strlen($response, '8bit');
} else {
$length = strlen($response);
}
header('Content-Length: ' . $length);
// send response to client
echo $response;
}
}
}