Klaus Demo nginx / 6652cc5
Accept-Encoding refactoring: remove ancient MSIE 4.x test for gzip Igor Sysoev 10 years ago
3 changed file(s) with 1 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
20242024 || r->headers_in.accept_encoding == NULL
20252025 || ngx_strcasestrn(r->headers_in.accept_encoding->value.data,
20262026 "gzip", 4 - 1)
2027 == NULL
2028
2029 /*
2030 * if the URL (without the "http://" prefix) is longer than 253 bytes,
2031 * then MSIE 4.x can not handle the compressed stream - it waits
2032 * too long, hangs up or crashes
2033 */
2034
2035 || (r->headers_in.msie4 && r->unparsed_uri.len > 200))
2027 == NULL)
20362028 {
20372029 return NGX_DECLINED;
20382030 }
14381438
14391439 switch (msie[5]) {
14401440 case '4':
1441 r->headers_in.msie4 = 1;
1442 /* fall through */
14431441 case '5':
14441442 r->headers_in.msie6 = 1;
14451443 break;
14621460 if (ngx_strstrn(user_agent, "Opera", 5 - 1)) {
14631461 r->headers_in.opera = 1;
14641462 r->headers_in.msie = 0;
1465 r->headers_in.msie4 = 0;
14661463 r->headers_in.msie6 = 0;
14671464 }
14681465
220220
221221 unsigned connection_type:2;
222222 unsigned msie:1;
223 unsigned msie4:1;
224223 unsigned msie6:1;
225224 unsigned opera:1;
226225 unsigned gecko:1;