moriyoshi Wed Oct 23 12:48:34 2002 EDT
Modified files:
/php4/ext/mbstring mbstring.c
Log:
MFH
Index: php4/ext/mbstring/mbstring.c
diff -u php4/ext/mbstring/mbstring.c:1.111 php4/ext/mbstring/mbstring.c:1.112
--- php4/ext/mbstring/mbstring.c:1.111 Mon Oct 21 06:47:41 2002
+++ php4/ext/mbstring/mbstring.c Wed Oct 23 12:48:33 2002
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: mbstring.c,v 1.111 2002/10/21 10:47:41 moriyoshi Exp $ */
+/* $Id: mbstring.c,v 1.112 2002/10/23 16:48:33 moriyoshi Exp $ */
/*
* PHP4 Multibyte String module "mbstring" (currently only for Japanese)
@@ -1856,12 +1856,7 @@
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;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php