File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -384,23 +384,23 @@ private function createContext(array $source): array
384384 $ name = $ config ->getOptionalString ('technicalcontact_name ' , null );
385385 $ mail = $ config ->getOptionalString ('technicalcontact_email ' , null );
386386
387- $ rawheader = "User-Agent: SimpleSAMLphp metarefresh, run by $ name < $ mail> \r\n" ;
387+ $ headers = [
388+ 'User-Agent ' => 'SimpleSAMLphp metarefresh, run by $name <$mail>";
389+ ];
388390
389391 if (isset($source[ ' conditionalGET']) && $ source ['conditionalGET ' ]) {
390392 if (array_key_exists ($ source ['src ' ], $ this ->state )) {
391393 $ sourceState = $ this ->state [$ source ['src ' ]];
392394
393395 if (isset ($ sourceState ['last-modified ' ])) {
394- $ rawheader .= 'If-Modified-Since: ' . $ sourceState ['last-modified ' ] . "\r\n" ;
396+ $ headers [ 'If-Modified-Since ' ] = $ sourceState ['last-modified ' ];
395397 }
396398
397399 if (isset ($ sourceState ['etag ' ])) {
398- $ rawheader .= 'If-None-Match: ' . $ sourceState ['etag ' ] . "\r\n" ;
400+ $ headers [ 'If-None-Match ' ] = $ sourceState ['etag ' ];
399401 }
400402 }
401403 }
402-
403- return ['http ' => ['header ' => $ rawheader ]];
404404 }
405405
406406
You can’t perform that action at this time.
0 commit comments