From: Uwe Schindler Date: Fri, 31 Oct 2003 12:20:33 +0000 (+0000) Subject: Send correct default content type from php.ini not static text/html (important for... X-Git-Tag: php-5.0.0b3RC1~819 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4dca199a98fcf6f90b49d992d00f3648d22b3a49;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 6ac71f1afa..3524b8b57e 100644 --- a/sapi/nsapi/nsapi.c +++ b/sapi/nsapi/nsapi.c @@ -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);