Skip to content

Commit 85080be

Browse files
committed
Review code issue resolved and solved Retry Conformance test
1 parent e228e2c commit 85080be

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

Storage/src/Connection/ConnectionInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public function getObject(array $args = []);
132132

133133
/**
134134
* @param array $args
135+
* @return array
135136
*/
136137
public function headObject(array $args = []);
137138

Storage/src/Connection/Rest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,12 +308,29 @@ public function getObject(array $args = [])
308308

309309
/**
310310
* @param array $args
311+
* @return array
311312
*/
312313
public function headObject(array $args = [])
313314
{
314315
$args += [
315316
'prettyPrint' => false,
316317
];
318+
319+
$args['restRetryFunction'] = $this->restRetryFunction ?? $this->getRestRetryFunction(
320+
'objects',
321+
'get',
322+
$args
323+
);
324+
325+
$args += array_filter([
326+
'retryStrategy' => $this->retryStrategy,
327+
'restDelayFunction' => $this->restDelayFunction,
328+
'restCalcDelayFunction' => $this->restCalcDelayFunction,
329+
'restRetryListener' => $this->restRetryListener,
330+
]);
331+
332+
$args = $this->addRetryHeaderLogic($args);
333+
317334
$requestOptions = $this->pluckArray([
318335
'restOptions',
319336
'retries',

0 commit comments

Comments
 (0)