From bca43470641daec801d3d686630efb78ab5ec758 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Thu, 25 Mar 2004 08:42:00 +0000 Subject: [PATCH] Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header --- NEWS | 2 ++ main/SAPI.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 557a309b74..36711fdfc2 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ????? 2004, PHP 5 Release Candidate 2 +- Fixed bug #27687 (Bug Adding Default Charset to "text/*" Content-Type + Header). (Marcus) - Fixed bug #27646 (Cannot serialize/unserialize non-finite numeric values). (Marcus) - Fixed bug #27641 (Object cloning in ze1_compatibility_mode was reimplemented) diff --git a/main/SAPI.c b/main/SAPI.c index 349a4f4fe6..1ab3cc7244 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -560,8 +560,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.50.1