From 95a4e94a534a6be8811d134835e1b6310ad1af84 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 5 Nov 2021 08:31:37 +0100 Subject: [PATCH] The response helper function must properly set the status code and the headers --- application/helpers/http_helper.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/helpers/http_helper.php b/application/helpers/http_helper.php index 82c9c1b0..8ab8c933 100644 --- a/application/helpers/http_helper.php +++ b/application/helpers/http_helper.php @@ -66,8 +66,14 @@ if ( ! function_exists('response')) /** @var EA_Controller $CI */ $CI = &get_instance(); + foreach ($headers as $header) + { + $CI->output->set_header($header); + } + $CI ->output + ->set_status_header($status) ->set_output($content); } }