diff --git a/src/Executor/Runner/Docker.php b/src/Executor/Runner/Docker.php index db90fe8..f993bd0 100644 --- a/src/Executor/Runner/Docker.php +++ b/src/Executor/Runner/Docker.php @@ -734,7 +734,8 @@ public function createExecution( \curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Content-Length: ' . \strlen($body ?: ''), - 'authorization: Bearer ' . System::getEnv('OPR_EXECUTOR_SECRET', '') + 'authorization: Bearer ' . System::getEnv('OPR_EXECUTOR_SECRET', ''), + 'Expect:' // Disable curl's "Expect: 100-continue" for large bodies ]); $executorResponse = \curl_exec($ch); @@ -854,7 +855,8 @@ public function createExecution( 'Content-Type: application/json', 'Content-Length: ' . \strlen($body ?: ''), 'x-internal-challenge: ' . $secret, - 'host: null' + 'host: null', + 'Expect:' // Disable curl's "Expect: 100-continue" for large bodies ]); $executorResponse = \curl_exec($ch); @@ -963,6 +965,9 @@ public function createExecution( $headersArr[] = $key . ': ' . $value; } + // Disable curl's "Expect: 100-continue" for bodies over 1 MiB, runtimes don't answer it + $headersArr[] = 'Expect:'; + \curl_setopt($ch, CURLOPT_HEADEROPT, CURLHEADER_UNIFIED); \curl_setopt($ch, CURLOPT_HTTPHEADER, $headersArr);