mirror of
https://github.com/friendica/friendica
synced 2025-05-09 15:04:10 +02:00
Add explicit status setting for PSR/ResponseInterface & add tests for OPTIONS endpoint
This commit is contained in:
parent
3092e74a3a
commit
eaad220738
6 changed files with 60 additions and 4 deletions
|
@ -378,6 +378,12 @@ class Page implements ArrayAccess
|
|||
*/
|
||||
public function exit(ResponseInterface $response)
|
||||
{
|
||||
header(sprintf("HTTP/%s %i %s",
|
||||
$response->getProtocolVersion(),
|
||||
$response->getStatusCode(),
|
||||
$response->getReasonPhrase())
|
||||
);
|
||||
|
||||
foreach ($response->getHeaders() as $key => $header) {
|
||||
if (is_array($header)) {
|
||||
$header_str = implode(',', $header);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue