comparison src/http/modules/ngx_http_image_filter_module.c @ 2943:5da043342fe4 stable-0.7

merge r2919: test GIF87a
author Igor Sysoev <igor@sysoev.ru>
date Mon, 15 Jun 2009 09:05:31 +0000
parents 896db5a09bd2
children 2efa8d2fcde1
comparison
equal deleted inserted replaced
2942:9ef3719c4d8a 2943:5da043342fe4
381 /* JPEG */ 381 /* JPEG */
382 382
383 return NGX_HTTP_IMAGE_JPEG; 383 return NGX_HTTP_IMAGE_JPEG;
384 384
385 } else if (p[0] == 'G' && p[1] == 'I' && p[2] == 'F' && p[3] == '8' 385 } else if (p[0] == 'G' && p[1] == 'I' && p[2] == 'F' && p[3] == '8'
386 && p[4] == '9' && p[5] == 'a') 386 && p[5] == 'a')
387 { 387 {
388 /* GIF */ 388 if (p[4] == '9' || p[4] == '7') {
389 389 /* GIF */
390 return NGX_HTTP_IMAGE_GIF; 390 return NGX_HTTP_IMAGE_GIF;
391 }
391 392
392 } else if (p[0] == 0x89 && p[1] == 'P' && p[2] == 'N' && p[3] == 'G' 393 } else if (p[0] == 0x89 && p[1] == 'P' && p[2] == 'N' && p[3] == 'G'
393 && p[4] == 0x0d && p[5] == 0x0a && p[6] == 0x1a && p[7] == 0x0a) 394 && p[4] == 0x0d && p[5] == 0x0a && p[6] == 0x1a && p[7] == 0x0a)
394 { 395 {
395 /* PNG */ 396 /* PNG */