# HG changeset patch # User Igor Sysoev # Date 1244186987 0 # Node ID 0070504324d8f215a82e16092fc57b94606a664f # Parent 62010fa37ead2c07c73e11859afda9273e13fa52 test GIF87a diff -r 62010fa37ead -r 0070504324d8 src/http/modules/ngx_http_image_filter_module.c --- a/src/http/modules/ngx_http_image_filter_module.c Wed Jun 03 13:57:28 2009 +0000 +++ b/src/http/modules/ngx_http_image_filter_module.c Fri Jun 05 07:29:47 2009 +0000 @@ -383,11 +383,12 @@ return NGX_HTTP_IMAGE_JPEG; } else if (p[0] == 'G' && p[1] == 'I' && p[2] == 'F' && p[3] == '8' - && p[4] == '9' && p[5] == 'a') + && p[5] == 'a') { - /* GIF */ - - return NGX_HTTP_IMAGE_GIF; + if (p[4] == '9' || p[4] == '7') { + /* GIF */ + return NGX_HTTP_IMAGE_GIF; + } } else if (p[0] == 0x89 && p[1] == 'P' && p[2] == 'N' && p[3] == 'G' && p[4] == 0x0d && p[5] == 0x0a && p[6] == 0x1a && p[7] == 0x0a)