diff options
author | Uwe Schindler <thetaphi@php.net> | 2003-10-31 12:20:33 +0000 |
---|---|---|
committer | Uwe Schindler <thetaphi@php.net> | 2003-10-31 12:20:33 +0000 |
commit | 4dca199a98fcf6f90b49d992d00f3648d22b3a49 (patch) | |
tree | 4513852ac147f6b0a90a771173dfa08acb482e4a | |
parent | 91b3f348747775691885fd4d9b7aef15a4625ab5 (diff) | |
download | php-git-4dca199a98fcf6f90b49d992d00f3648d22b3a49.tar.gz |
Send correct default content type from php.ini not static text/html (important for other charsets than iso-8859-1)
-rw-r--r-- | sapi/nsapi/nsapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); |