diff --git a/Model/Http/BoldClient.php b/Model/Http/BoldClient.php index 3469e30d..b14d046f 100644 --- a/Model/Http/BoldClient.php +++ b/Model/Http/BoldClient.php @@ -170,6 +170,7 @@ private function getHeaders(int $websiteId): array 'Content-Type' => 'application/json', 'User-Agent' => $this->userAgent->getUserAgentData(), 'Bold-API-Version-Date' => self::BOLD_API_VERSION_DATE, + 'Expect' => '', ]; } diff --git a/Model/Http/Client/Command/Client/Curl.php b/Model/Http/Client/Command/Client/Curl.php index 2146cca9..34b9985d 100644 --- a/Model/Http/Client/Command/Client/Curl.php +++ b/Model/Http/Client/Command/Client/Curl.php @@ -87,6 +87,17 @@ protected function makeRequest($method, $uri, $params = []) if ($err) { $this->doError(curl_error($this->_ch)); } + $httpCode = curl_getinfo($this->_ch, CURLINFO_HTTP_CODE); + if ($httpCode == 100) { + $this->_responseBody = curl_exec($this->_ch); + $err = curl_errno($this->_ch); + if ($err) { + $this->doError(curl_error($this->_ch)); + } + $httpCode = curl_getinfo($this->_ch, CURLINFO_HTTP_CODE); + } + + $this->_responseStatus = $httpCode; curl_close($this->_ch); } }