Skip to content

Commit

Permalink
Merge pull request #100 from bold-commerce/CHK-6099
Browse files Browse the repository at this point in the history
Hydrate call can receive a 100-continue header.
  • Loading branch information
NickolasMalovanets authored Oct 23, 2024
2 parents 9c4d936 + 14f506d commit 11c5888
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Model/Http/BoldClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => '',
];
}

Expand Down
11 changes: 11 additions & 0 deletions Model/Http/Client/Command/Client/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 11c5888

Please sign in to comment.