From: Uwe Schindler Date: Fri, 31 Oct 2003 12:17:43 +0000 (+0000) Subject: Send correct default content type from php.ini not static text/html (important for... X-Git-Tag: php-4.3.5RC1~264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=112c1def739eb00f7bdb4a1dbbc5b0e6fabe9a01;p=php Send correct default content type from php.ini not static text/html (important for other charsets than iso-8859-1) --- diff --git a/sapi/nsapi/nsapi.c b/sapi/nsapi/nsapi.c index c0bade2237..0e45674910 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -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);