Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-06-05 11:29:47 +0400
committerIgor Sysoev <igor@sysoev.ru>2009-06-05 11:29:47 +0400
commitabf5d3fbe2959fbab4e7cc436de67d34973e71c6 (patch)
tree68f5a67c830512a91b50091b6107ce18b447d9d2
parent5a2898f2b4c38dc6d199a459b06c3cd51a11ea7b (diff)
test GIF87a
-rw-r--r--src/http/modules/ngx_http_image_filter_module.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_image_filter_module.c b/src/http/modules/ngx_http_image_filter_module.c
index b0e5fed6b..469d703f6 100644
--- a/src/http/modules/ngx_http_image_filter_module.c
+++ b/src/http/modules/ngx_http_image_filter_module.c
@@ -383,11 +383,12 @@ ngx_http_image_test(ngx_http_request_t *r, ngx_chain_t *in)
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)