From: Sascha Schumann Date: Tue, 7 Aug 2001 08:34:02 +0000 (+0000) Subject: The module usually did not send out Content-Type: text/html. X-Git-Tag: BEFORE_PARAM_PARSING_CHANGE~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61618d4a034f555d33cc48ecad8e94125c0a84cb;p=php The module usually did not send out Content-Type: text/html. No major browser seems to care, Opera does though. --- 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;