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

index 17c56af34d77c7f84505c1e35f47f86435bc3808..aff85a1e0c9cd1c094fadc590c033b47fcd043b4 100644 (file)
@@ -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)) {