summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/SAPI.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 7d984a37db..20559b3650 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -502,14 +502,14 @@ 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') {
+ ptr++;
+ }
#if HAVE_ZLIB
- if(strncmp(ptr, "image/", sizeof("image/"))) {
+ if(!strncmp(ptr, "image/", sizeof("image/")-1)) {
ZLIBG(output_compression) = 0;
}
#endif
- while (*ptr == ' ' && *ptr != '\0') {
- ptr++;
- }
mimetype = estrdup(ptr);
newlen = sapi_apply_default_charset(&mimetype, len TSRMLS_CC);
if (!SG(sapi_headers).mimetype){