From f9c6bb1ad84312ac1de39f2b57bfcfff5b8ad022 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Loyet?= Date: Mon, 23 Aug 2010 20:40:44 +0000 Subject: [PATCH] - Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers). --- NEWS | 2 ++ sapi/fpm/fpm/fpm_status.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index f60387f93d..a50dd1b931 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,8 @@ - Changed the $context parameter on copy() to actually have an effect. (Kalle) - Fixed possible crash in mssql_fetch_batch(). (Kalle) +- Fixed bug #52674 (FPM Status page returns inconsistent Content-Type headers). + (fat) - Fixed bug #52654 (mysqli doesn't install headers with structures it uses). (Andrey) - Fixed bug #52636 (php_mysql_fetch_hash writes long value into int). diff --git a/sapi/fpm/fpm/fpm_status.c b/sapi/fpm/fpm/fpm_status.c index a9d30cf273..50efaf8df1 100644 --- a/sapi/fpm/fpm/fpm_status.c +++ b/sapi/fpm/fpm/fpm_status.c @@ -138,7 +138,7 @@ static void fpm_status_handle_status_txt(struct fpm_status_s *status, char **out "total processes: %d\n", status->accepted_conn, fpm_status_pool, status->pm == PM_STYLE_STATIC ? "static" : "dynamic", status->idle, status->active, status->total); - spprintf(content_type, 0, "text/plain"); + spprintf(content_type, 0, "Content-Type: text/plain"); } /* }}} */ @@ -159,7 +159,7 @@ static void fpm_status_handle_status_html(struct fpm_status_s *status, char **ou "", status->accepted_conn, fpm_status_pool, status->pm == PM_STYLE_STATIC ? "static" : "dynamic", status->idle, status->active, status->total); - spprintf(content_type, 0, "text/html"); + spprintf(content_type, 0, "Content-Type: text/html"); } /* }}} */ @@ -180,7 +180,7 @@ static void fpm_status_handle_status_json(struct fpm_status_s *status, char **ou "}", status->accepted_conn, fpm_status_pool, status->pm == PM_STYLE_STATIC ? "static" : "dynamic", status->idle, status->active, status->total); - spprintf(content_type, 0, "application/jsonrequest"); + spprintf(content_type, 0, "Content-Type: application/json"); } /* }}} */ -- 2.50.1