From 4dca199a98fcf6f90b49d992d00f3648d22b3a49 Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Fri, 31 Oct 2003 12:20:33 +0000 Subject: [PATCH] Send correct default content type from php.ini not static text/html (important for other charsets than iso-8859-1) --- sapi/nsapi/nsapi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.50.1