From: Marcus Boerger Date: Sat, 27 Mar 2004 01:45:44 +0000 (+0000) Subject: Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header X-Git-Tag: php-4.3.6RC1~32 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5188dd875f1031658be826567aac731b3cac8ea1;p=php Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header --- diff --git a/main/SAPI.c b/main/SAPI.c index 17c56af34d..aff85a1e0c 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -550,8 +550,9 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) if (!STRCASECMP(header_line, "Content-Type")) { char *ptr = colon_offset+1, *mimetype = NULL, *newheader; size_t len = header_line_len - (ptr - header_line), newlen; - while (*ptr == ' ' && *ptr != '\0') { + while (*ptr == ' ') { ptr++; + len--; } #if HAVE_ZLIB if(!strncmp(ptr, "image/", sizeof("image/")-1)) {