]> granicus.if.org Git - php/commitdiff
The module usually did not send out Content-Type: text/html.
authorSascha Schumann <sas@php.net>
Tue, 7 Aug 2001 08:34:02 +0000 (08:34 +0000)
committerSascha Schumann <sas@php.net>
Tue, 7 Aug 2001 08:34:02 +0000 (08:34 +0000)
No major browser seems to care, Opera does though.

sapi/thttpd/thttpd.c

index d14325db94d4e49a5dcb999dce6990f97f7a1c85..04be81603b445cad26037a636a781061b21e781d 100644 (file)
@@ -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;