Merge branch '0.1'
Conflicts: src/BeSimple/SoapServer/SoapResponse.php
This commit is contained in:
commit
10705aa9e2
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue