From af68c11abf5d5a64fd7136e1d2e37323d170c77e Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Sat, 26 Apr 2025 13:03:51 +0200 Subject: [PATCH] fix: incorrect headers on the api (#802) --- api/admin/get_admin_settings.php | 2 +- api/categories/get_categories.php | 2 +- api/currencies/get_currencies.php | 2 +- api/fixer/get_fixer.php | 2 +- api/household/get_household.php | 2 +- api/notifications/get_notification_settings.php | 2 +- api/payment_methods/get_payment_methods.php | 2 +- api/settings/get_settings.php | 2 +- api/status/version.php | 2 +- api/subscriptions/get_ical_feed.php | 2 +- api/subscriptions/get_monthly_cost.php | 2 +- api/subscriptions/get_subscriptions.php | 2 +- api/users/get_user.php | 2 +- includes/version.php | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/api/admin/get_admin_settings.php b/api/admin/get_admin_settings.php index b7cd423..056850a 100644 --- a/api/admin/get_admin_settings.php +++ b/api/admin/get_admin_settings.php @@ -35,7 +35,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/categories/get_categories.php b/api/categories/get_categories.php index 185f9ac..9f7a179 100644 --- a/api/categories/get_categories.php +++ b/api/categories/get_categories.php @@ -40,7 +40,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/currencies/get_currencies.php b/api/currencies/get_currencies.php index 832a144..7d7d049 100644 --- a/api/currencies/get_currencies.php +++ b/api/currencies/get_currencies.php @@ -48,7 +48,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/fixer/get_fixer.php b/api/fixer/get_fixer.php index 05abc8f..e21d4a4 100644 --- a/api/fixer/get_fixer.php +++ b/api/fixer/get_fixer.php @@ -25,7 +25,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/household/get_household.php b/api/household/get_household.php index 9a0f3ef..70e27fe 100644 --- a/api/household/get_household.php +++ b/api/household/get_household.php @@ -34,7 +34,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/notifications/get_notification_settings.php b/api/notifications/get_notification_settings.php index e1f2892..01df211 100644 --- a/api/notifications/get_notification_settings.php +++ b/api/notifications/get_notification_settings.php @@ -38,7 +38,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/payment_methods/get_payment_methods.php b/api/payment_methods/get_payment_methods.php index 79c5f15..9a8afe7 100644 --- a/api/payment_methods/get_payment_methods.php +++ b/api/payment_methods/get_payment_methods.php @@ -70,7 +70,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/settings/get_settings.php b/api/settings/get_settings.php index d37d940..e4294e5 100644 --- a/api/settings/get_settings.php +++ b/api/settings/get_settings.php @@ -34,7 +34,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/status/version.php b/api/status/version.php index 1accfab..ef204fe 100644 --- a/api/status/version.php +++ b/api/status/version.php @@ -24,7 +24,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; require_once '../../includes/version.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/subscriptions/get_ical_feed.php b/api/subscriptions/get_ical_feed.php index 6bae259..bbeddbc 100644 --- a/api/subscriptions/get_ical_feed.php +++ b/api/subscriptions/get_ical_feed.php @@ -10,7 +10,7 @@ It returns a downloadable VCAL file with the active subscriptions require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/subscriptions/get_monthly_cost.php b/api/subscriptions/get_monthly_cost.php index 4bca50f..53c366e 100644 --- a/api/subscriptions/get_monthly_cost.php +++ b/api/subscriptions/get_monthly_cost.php @@ -29,7 +29,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/subscriptions/get_subscriptions.php b/api/subscriptions/get_subscriptions.php index 880cb2d..da83b2b 100644 --- a/api/subscriptions/get_subscriptions.php +++ b/api/subscriptions/get_subscriptions.php @@ -82,7 +82,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/api/users/get_user.php b/api/users/get_user.php index 7582595..a6450f5 100644 --- a/api/users/get_user.php +++ b/api/users/get_user.php @@ -32,7 +32,7 @@ Example response: require_once '../../includes/connect_endpoint.php'; -header('Content-Type: application/json, charset=UTF-8'); +header('Content-Type: application/json; charset=UTF-8'); if ($_SERVER["REQUEST_METHOD"] === "POST" || $_SERVER["REQUEST_METHOD"] === "GET") { // if the parameters are not set, return an error diff --git a/includes/version.php b/includes/version.php index d2d4ab5..d6cff60 100644 --- a/includes/version.php +++ b/includes/version.php @@ -1,3 +1,3 @@ \ No newline at end of file