]> granicus.if.org Git - php/commitdiff
Fixed bug #27687 (Bug Adding Default Charset to 'text/*' Content-Type Header
authorMarcus Boerger <helly@php.net>
Thu, 25 Mar 2004 08:42:00 +0000 (08:42 +0000)
committerMarcus Boerger <helly@php.net>
Thu, 25 Mar 2004 08:42:00 +0000 (08:42 +0000)
NEWS
main/SAPI.c

diff --git a/NEWS b/NEWS
index 557a309b74db0159775f25a3f74afcb1757028a8..36711fdfc2685ac54945d3539cdc7a4601d1ef22 100644 (file)
--- 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)
index 349a4f4fe6d3fc484757d1328560f8059529c48c..1ab3cc72449045fa442518653414ae1fb1df80e0 100644 (file)
@@ -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)) {