Skip to content

Commit 780ec6b

Browse files
authored
Merge pull request #185 from open-runtimes/remove-partial-error
chore: remove check for partial errNo
2 parents 5fea259 + f1f3109 commit 780ec6b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Executor/Runner/Docker.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ public function createExecution(
960960

961961
\curl_setopt($ch, CURLOPT_URL, "http://" . $hostname . ":3000" . $path);
962962
\curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
963-
\curl_setopt($ch, CURLOPT_NOBODY, $method === 'HEAD');
963+
\curl_setopt($ch, CURLOPT_NOBODY, \strtoupper($method) === 'HEAD');
964964
\curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
965965
\curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
966966
\curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($curl, $header) use (&$responseHeaders) {
@@ -1134,10 +1134,7 @@ public function createExecution(
11341134
} while ((++$attempts < $retryAttempts) || (\microtime(true) - $startTime < $timeout));
11351135

11361136
// Error occurred
1137-
if (
1138-
$executionResponse['errNo'] !== CURLE_OK &&
1139-
$executionResponse['errNo'] !== CURLE_PARTIAL_FILE // Head request may return partial file
1140-
) {
1137+
if ($executionResponse['errNo'] !== CURLE_OK) {
11411138
// Intended timeout error for v2 functions
11421139
if ($version === 'v2' && $executionResponse['errNo'] === SOCKET_ETIMEDOUT) {
11431140
throw new Exception(Exception::EXECUTION_TIMEOUT, $executionResponse['error'], 400);

0 commit comments

Comments
 (0)