]> 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:17:43 +0000 (12:17 +0000)
committerUwe Schindler <thetaphi@php.net>
Fri, 31 Oct 2003 12:17:43 +0000 (12:17 +0000)
sapi/nsapi/nsapi.c

index c0bade223771ba3d228c318fa44299b992b8148a..0e45674910a7644e5acef3fdda88ec0c7a24485e 100644 (file)
@@ -511,8 +511,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);