From: Ilia Alshanetsky Date: Wed, 19 Oct 2005 20:30:38 +0000 (+0000) Subject: Fixed bug #29983 (PHP does not explicitly set mime type & charset). X-Git-Tag: RELEASE_0_9_1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=50686f4d7c9c04ab85b1739c3a623470c55ba1ca;p=php Fixed bug #29983 (PHP does not explicitly set mime type & charset). --- diff --git a/main/SAPI.c b/main/SAPI.c index e12717d338..4b0335e716 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -794,6 +794,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) {