diff options
author | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-10-23 16:48:33 +0000 |
---|---|---|
committer | Moriyoshi Koizumi <moriyoshi@php.net> | 2002-10-23 16:48:33 +0000 |
commit | cbc9256fc9ca9f3db7fdae19c0b9d6222735487d (patch) | |
tree | 1162ab31370cb92ff19601844e5fe201d5c59c7a | |
parent | a681203a83970dbdce24a4968b61ff5584e579f1 (diff) | |
download | php-git-cbc9256fc9ca9f3db7fdae19c0b9d6222735487d.tar.gz |
MFH
-rw-r--r-- | ext/mbstring/mbstring.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 2243bc46ff..d325be628b 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1856,12 +1856,7 @@ PHP_FUNCTION(mb_output_handler) if (SG(sapi_headers).send_default_content_type || send_text_mimetype) { charset = mbfl_no2preferred_mime_name(encoding); if (charset) { - len = (sizeof ("Content-Type:")-1) + strlen(mimetype) + (sizeof (";charset=")-1) + strlen(charset) + 1; - p = emalloc(len); - strcpy(p, "Content-Type:"); - strcat(p, mimetype); - strcat(p, ";charset="); - strcat(p, charset); + len = spprintf( &p, 0, "Content-Type: %s; charset=%s", mimetype, charset ); if (sapi_add_header(p, len, 0) != FAILURE) SG(sapi_headers).send_default_content_type = 0; } |