summaryrefslogtreecommitdiff
path: root/sapi/thttpd
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2001-08-07 08:34:02 +0000
committerSascha Schumann <sas@php.net>2001-08-07 08:34:02 +0000
commit61618d4a034f555d33cc48ecad8e94125c0a84cb (patch)
tree18c189918aa5c6ebb636a391a2df3672ccbc9e38 /sapi/thttpd
parent9802b1632ccd75d42092f48bd7933b0ff4cc294a (diff)
downloadphp-git-61618d4a034f555d33cc48ecad8e94125c0a84cb.tar.gz
The module usually did not send out Content-Type: text/html.
No major browser seems to care, Opera does though.
Diffstat (limited to 'sapi/thttpd')
-rw-r--r--sapi/thttpd/thttpd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sapi/thttpd/thttpd.c b/sapi/thttpd/thttpd.c
index d14325db94..04be81603b 100644
--- a/sapi/thttpd/thttpd.c
+++ b/sapi/thttpd/thttpd.c
@@ -95,6 +95,13 @@ static int sapi_thttpd_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
TG(hc)->bytes_sent += len;
n++;
+#define DEF_CONTENT_TYPE_LINE "Content-Type: text/html"
+ if (SG(sapi_headers).send_default_content_type) {
+ vec[n].iov_base = DEF_CONTENT_TYPE_LINE;
+ vec[n].iov_len = sizeof(DEF_CONTENT_TYPE_LINE) - 1;
+ n++;
+ }
+
h = zend_llist_get_first_ex(&sapi_headers->headers, &pos);
while (h) {
vec[n].iov_base = h->header;