From b8973a09deed6161e60ebf08cec69b13fe59d43f Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Wed, 19 Oct 2005 20:36:22 +0000 Subject: [PATCH] MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset). --- NEWS | 1 + main/SAPI.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1b877b68ae..cf2d514cf5 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ PHP 4 NEWS transfer). (Ilia) - Fixed bug #34704 (Infinite recursion due to corrupt JPEG). (Marcus) - Fixed bug #33383 (crash when retrieving empty LOBs). (Tony) +- Fixed bug #29983 (PHP does not explicitly set mime type & charset). (Ilia) 07 Oct 2005, Version 4.4.1RC1 - Added missing safe_mode checks for image* functions and cURL. (Ilia) diff --git a/main/SAPI.c b/main/SAPI.c index b5d896d247..8d9f4a23fb 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -745,6 +745,12 @@ SAPI_API int sapi_send_headers(TSRMLS_D) /* Success-oriented. We set headers_sent to 1 here to avoid an infinite loop * in case of an error situation. */ + if (SG(sapi_headers).send_default_content_type && sapi_module.send_headers) { + sapi_header_struct default_header; + sapi_get_default_content_type_header(&default_header TSRMLS_CC); + sapi_add_header_ex(default_header.header, default_header.header_len, 0, 0 TSRMLS_CC); + } + SG(headers_sent) = 1; if (sapi_module.send_headers) { -- 2.40.0