]> granicus.if.org Git - php/commitdiff
Send correct default content type from php.ini not static text/html (important for...
authorUwe Schindler <thetaphi@php.net>
Fri, 31 Oct 2003 12:20:33 +0000 (12:20 +0000)
committerUwe Schindler <thetaphi@php.net>
Fri, 31 Oct 2003 12:20:33 +0000 (12:20 +0000)
sapi/nsapi/nsapi.c

index 6ac71f1afa0cf0290cd40f99b5c9fd9ef1015974..3524b8b57e648b0d5934d8e281bdd141b91a4f2b 100644 (file)
@@ -506,8 +506,11 @@ static int sapi_nsapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC)
         * don't know what the implication of doing it there is.
         */
        if (SG(sapi_headers).send_default_content_type) {
+               char *hd;
                param_free(pblock_remove("content-type", rc->rq->srvhdrs));
-               pblock_nvinsert("content-type", "text/html", rc->rq->srvhdrs);
+               hd = sapi_get_default_content_type(TSRMLS_C);
+               pblock_nvinsert("content-type", hd, rc->rq->srvhdrs);
+               efree(hd);
        }
 
        protocol_status(rc->sn, rc->rq, SG(sapi_headers).http_response_code, NULL);