SoapServer/Client now handle binary files correctly & large tests/fixtures update
Soap Server and Client were breaking binary files during transfer due to invalid Mime Message Parser. Now is it working fine with no errors, but the message parser is about to be rewritten into a better form.
This commit is contained in:
@ -204,8 +204,12 @@ class SoapServer extends \SoapServer
|
||||
$attachments = [];
|
||||
if ($soapRequest->hasAttachments()) {
|
||||
foreach ($soapRequest->getAttachments() as $attachment) {
|
||||
$fileName = $attachment->getHeader('Content-Disposition', 'filename');
|
||||
if ($fileName === null) {
|
||||
$fileName = basename($attachment->getHeader('Content-Location'));
|
||||
}
|
||||
$attachments[] = new SoapAttachment(
|
||||
$attachment->getHeader('Content-Disposition', 'filename'),
|
||||
$fileName,
|
||||
$attachment->getHeader('Content-Type'),
|
||||
$attachment->getContent()
|
||||
);
|
||||
|
@ -6,7 +6,7 @@ use BeSimple\SoapServer\SoapOptions\SoapServerOptions;
|
||||
|
||||
class SoapServerOptionsBuilder
|
||||
{
|
||||
static public function createWithDefaults($handlerClassOrObject)
|
||||
public static function createWithDefaults($handlerClassOrObject)
|
||||
{
|
||||
return new SoapServerOptions(
|
||||
$handlerClassOrObject,
|
||||
|
Reference in New Issue
Block a user