From 5188dd875f1031658be826567aac731b3cac8ea1 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sat, 27 Mar 2004 01:45:44 +0000 Subject: [PATCH] Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header --- main/SAPI.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) { -- 2.40.0