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

index e12717d3384f771b7bbe0bbad20cb7d26be1d4fc..4b0335e71608fa721fe1ea81a1c0c8c50ba13448 100644 (file)
@@ -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) {