From a2ccfd55962286b0a94763a69944a168f3b102f0 Mon Sep 17 00:00:00 2001 From: Renko Steenbeek Date: Fri, 9 May 2025 11:58:16 +0200 Subject: [PATCH] Fix SOAPAction header quotes to comply with HTTP spec - Add double quotes around SOAPAction header value as required by SOAP 1.1 spec - Remove unnecessary quotes around charset in Content-Type header --- src/RequestBuilder.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RequestBuilder.php b/src/RequestBuilder.php index 10c3931..bc2b50c 100644 --- a/src/RequestBuilder.php +++ b/src/RequestBuilder.php @@ -184,7 +184,7 @@ private function prepareSoap11Headers() $headers = []; $headers['Content-Length'] = $this->soapMessage->getSize(); $headers['SOAPAction'] = $this->soapAction; - $headers['Content-Type'] = 'text/xml; charset="utf-8"'; + $headers['Content-Type'] = 'text/xml; charset=utf-8'; return $headers; } @@ -199,7 +199,7 @@ private function prepareSoap12Headers() $headers = []; if ($this->httpMethod == 'POST') { $headers['Content-Length'] = $this->soapMessage->getSize(); - $headers['Content-Type'] = 'application/soap+xml; charset="utf-8"' . '; action="' . $this->soapAction . '"'; + $headers['Content-Type'] = 'application/soap+xml; charset=utf-8' . '; action=' . $this->soapAction; } else { $headers['Accept'] = 'application/soap+xml'; }