summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-10-19 20:33:33 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-10-19 20:33:33 +0000
commit382bc9d0e41661473d68b97bc0f72e49dd3c4c53 (patch)
tree63b8a189d4c08af1429b5d6712926711b1243f58 /main/SAPI.c
parent4d0439e4879ec9b1f6b6120ef0b45ffc1dc02e2f (diff)
downloadphp-git-382bc9d0e41661473d68b97bc0f72e49dd3c4c53.tar.gz
MFH: Fixed bug #29983 (PHP does not explicitly set mime type & charset).
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index a444a6b898..132c1854f7 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -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) {