diff --git a/src/BeSimple/SoapServer/SoapResponse.php b/src/BeSimple/SoapServer/SoapResponse.php index e624fcb..01789b8 100644 --- a/src/BeSimple/SoapServer/SoapResponse.php +++ b/src/BeSimple/SoapServer/SoapResponse.php @@ -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; } -} \ No newline at end of file +}