]> granicus.if.org Git - php/commitdiff
MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset).
authorIlia Alshanetsky <iliaa@php.net>
Wed, 19 Oct 2005 20:33:33 +0000 (20:33 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Wed, 19 Oct 2005 20:33:33 +0000 (20:33 +0000)
NEWS
main/SAPI.c

diff --git a/NEWS b/NEWS
index e0baf0c5ddd6bdb66330f7896e97e6a256eb8da5..b595492448c6268bdac922571c67099f50876666 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ PHP                                                                        NEWS
 - Fixed bug #33829 (mime_content_type() returns text/plain for gzip and bzip 
   files). (Derick)
 - Fixed bug #34623 (Crash in pdo_mysql on longtext fields). (Ilia)
+- Fixed bug #29983 (PHP does not explicitly set mime type & charset). (Ilia)
 
 17 Oct 2005, PHP 5.1 Release Candidate 3
 - Fixed bug #34873 (Segmentation Fault on foreach in object). (Dmitry)
index a444a6b89825490991edce6f55fdc7627bf5122d..132c1854f7f3db71f92862e15c728690ecfb19df 100644 (file)
@@ -772,6 +772,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) {