Merge branch '0.1'

Conflicts:
	src/BeSimple/SoapServer/SoapResponse.php
This commit is contained in:
Francis Besset 2013-11-06 16:50:31 +01:00
commit 10705aa9e2
2 changed files with 7 additions and 13 deletions

View File

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

View File

@ -100,6 +100,10 @@ class SoapServer extends \SoapServer
parent::handle($soapRequest->getContent());
$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
$soapResponse = SoapResponse::create(
$response,