]> git.kaiwu.me - nginx.git/commitdiff
Accept-Encoding refactoring: remove ancient MSIE 4.x test for gzip
authorIgor Sysoev <igor@sysoev.ru>
Sat, 30 Jul 2011 06:20:06 +0000 (06:20 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sat, 30 Jul 2011 06:20:06 +0000 (06:20 +0000)
src/http/ngx_http_core_module.c
src/http/ngx_http_request.c
src/http/ngx_http_request.h

index 597b64c51d67e4e7bd2f6aa3a0566bcd78577dcb..02deb0ac02b2f71bb1f178c1c965c5e89e3fc8c1 100644 (file)
@@ -2025,15 +2025,7 @@ ngx_http_gzip_ok(ngx_http_request_t *r)
         || r->headers_in.accept_encoding == NULL
         || ngx_strcasestrn(r->headers_in.accept_encoding->value.data,
                            "gzip", 4 - 1)
-           == NULL
-
-        /*
-         * if the URL (without the "http://" prefix) is longer than 253 bytes,
-         * then MSIE 4.x can not handle the compressed stream - it waits
-         * too long, hangs up or crashes
-         */
-
-        || (r->headers_in.msie4 && r->unparsed_uri.len > 200))
+           == NULL)
     {
         return NGX_DECLINED;
     }
index 2cef4fa5ba1cd0204bed7f483532daed031e222c..167bc715a2c26d1f33d472fe551cb27a0c5e9ec9 100644 (file)
@@ -1439,8 +1439,6 @@ ngx_http_process_user_agent(ngx_http_request_t *r, ngx_table_elt_t *h,
 
             switch (msie[5]) {
             case '4':
-                r->headers_in.msie4 = 1;
-                /* fall through */
             case '5':
                 r->headers_in.msie6 = 1;
                 break;
@@ -1463,7 +1461,6 @@ ngx_http_process_user_agent(ngx_http_request_t *r, ngx_table_elt_t *h,
     if (ngx_strstrn(user_agent, "Opera", 5 - 1)) {
         r->headers_in.opera = 1;
         r->headers_in.msie = 0;
-        r->headers_in.msie4 = 0;
         r->headers_in.msie6 = 0;
     }
 
index c20810ed511cddb8a27aa4c3e32fd5af7a08b102..6198d7ef2ab9e036eb537cf31a12f954608a75e3 100644 (file)
@@ -221,7 +221,6 @@ typedef struct {
 
     unsigned                          connection_type:2;
     unsigned                          msie:1;
-    unsigned                          msie4:1;
     unsigned                          msie6:1;
     unsigned                          opera:1;
     unsigned                          gecko:1;