2828 ->action (function (string $ runtimeId , string $ timeoutStr , Response $ response , Runner $ runner ): void {
2929 $ timeout = \intval ($ timeoutStr );
3030
31- $ response ->sendHeader ('Content-Type ' , 'text/event-stream ' );
32- $ response ->sendHeader ('Cache-Control ' , 'no-cache ' );
31+ $ response ->sendHeader ('Content-Type ' , [ 'text/event-stream ' ] );
32+ $ response ->sendHeader ('Cache-Control ' , [ 'no-cache ' ] );
3333
3434 $ runner ->getLogs ($ runtimeId , $ timeout , $ response );
3535
@@ -234,7 +234,7 @@ function (
234234 );
235235
236236 // Backwards compatibility for headers
237- $ responseFormat = $ request ->getHeader ('x-executor-response-format ' , '0.10.0 ' ); // Last version without support for array value for headers
237+ $ responseFormat = $ request ->getHeaderLine ('x-executor-response-format ' , '0.10.0 ' ); // Last version without support for array value for headers
238238 if (version_compare ($ responseFormat , '0.11.0 ' , '< ' )) {
239239 foreach ($ execution ['headers ' ] as $ key => $ value ) {
240240 if (\is_array ($ value )) {
@@ -244,7 +244,7 @@ function (
244244 }
245245 }
246246
247- $ acceptTypes = \explode (', ' , $ request ->getHeader ('accept ' , 'multipart/form-data ' ));
247+ $ acceptTypes = \explode (', ' , $ request ->getHeaderLine ('accept ' , 'multipart/form-data ' ));
248248 $ isJson = array_any ($ acceptTypes , fn ($ acceptType ): bool => \str_starts_with ((string ) $ acceptType , 'application/json ' ) || \str_starts_with ((string ) $ acceptType , 'application/* ' ));
249249
250250 if ($ isJson ) {
@@ -284,7 +284,7 @@ function (
284284 ->groups (['api ' ])
285285 ->inject ('request ' )
286286 ->action (function (Request $ request ): void {
287- $ secretKey = \explode (' ' , $ request ->getHeader ('authorization ' , '' ))[1 ] ?? '' ;
287+ $ secretKey = \explode (' ' , $ request ->getHeaderLine ('authorization ' , '' ))[1 ] ?? '' ;
288288 if ($ secretKey === '' || $ secretKey === '0 ' || $ secretKey !== System::getEnv ('OPR_EXECUTOR_SECRET ' , '' )) {
289289 throw new Exception (Exception::GENERAL_UNAUTHORIZED , 'Missing executor key ' );
290290 }
0 commit comments