Merge branch '0.1'
Conflicts: src/BeSimple/SoapServer/SoapResponse.php
This commit is contained in:
commit
10705aa9e2
|
@ -52,18 +52,8 @@ class SoapResponse extends CommonSoapResponse
|
||||||
{
|
{
|
||||||
// set Content-Type header
|
// set Content-Type header
|
||||||
header('Content-Type: '.$this->getContentType());
|
header('Content-Type: '.$this->getContentType());
|
||||||
// get content to send
|
|
||||||
$response = $this->getContent();
|
|
||||||
|
|
||||||
// set Content-Length header
|
// send content to client
|
||||||
if (function_exists('mb_strlen')) {
|
echo $this->getContent();
|
||||||
$length = mb_strlen($response, '8bit');
|
|
||||||
} else {
|
|
||||||
$length = strlen($response);
|
|
||||||
}
|
|
||||||
header('Content-Length: ' . $length);
|
|
||||||
|
|
||||||
// send response to client
|
|
||||||
echo $response;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,10 @@ class SoapServer extends \SoapServer
|
||||||
parent::handle($soapRequest->getContent());
|
parent::handle($soapRequest->getContent());
|
||||||
$response = ob_get_clean();
|
$response = ob_get_clean();
|
||||||
|
|
||||||
|
// Remove headers added by SoapServer::handle() method
|
||||||
|
header_remove('Content-Length');
|
||||||
|
header_remove('Content-Type');
|
||||||
|
|
||||||
// wrap response data in SoapResponse object
|
// wrap response data in SoapResponse object
|
||||||
$soapResponse = SoapResponse::create(
|
$soapResponse = SoapResponse::create(
|
||||||
$response,
|
$response,
|
||||||
|
|
Loading…
Reference in New Issue