[SoapServer] Removed headers added by SoapServer::handle() method
This commit is contained in:
parent
e9429a5d03
commit
7fa666e9de
@ -51,12 +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();
|
||||
// set Content-Length header
|
||||
header('Content-Length: '. strlen($response));
|
||||
// send response to client
|
||||
echo $response;
|
||||
header('Content-Type: '.$this->getContentType());
|
||||
|
||||
// send content to client
|
||||
echo $this->getContent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,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,
|
||||
@ -158,4 +162,4 @@ class SoapServer extends \SoapServer
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user