comparison src/http/modules/ngx_http_gzip_static_module.c @ 3249:1966ba1d76fd stable-0.7

merge r3055, r3136: gzip related fixes: *) do not disable gzip for MSIE 6.0 SV1 in "gzip_disable msie6" *) nginx always sent "Vary: Accept-Encoding", if both gzip_static and gzip_vary were on
author Igor Sysoev <igor@sysoev.ru>
date Mon, 26 Oct 2009 17:34:43 +0000
parents 2efa8d2fcde1
children 975f0558aab3 44df6e76c28b
comparison
equal deleted inserted replaced
3248:8c76116820f3 3249:1966ba1d76fd
93 return NGX_DECLINED; 93 return NGX_DECLINED;
94 } 94 }
95 95
96 gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module); 96 gzcf = ngx_http_get_module_loc_conf(r, ngx_http_gzip_static_module);
97 97
98 if (!gzcf->enable || ngx_http_gzip_ok(r) != NGX_OK) { 98 if (!gzcf->enable) {
99 return NGX_DECLINED;
100 }
101
102 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
103
104 if (clcf->gzip_vary && ngx_http_gzip_ok(r) != NGX_OK) {
99 return NGX_DECLINED; 105 return NGX_DECLINED;
100 } 106 }
101 107
102 log = r->connection->log; 108 log = r->connection->log;
103 109
113 119
114 path.len = p - path.data; 120 path.len = p - path.data;
115 121
116 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, 122 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0,
117 "http filename: \"%s\"", path.data); 123 "http filename: \"%s\"", path.data);
118
119 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
120 124
121 ngx_memzero(&of, sizeof(ngx_open_file_info_t)); 125 ngx_memzero(&of, sizeof(ngx_open_file_info_t));
122 126
123 of.directio = clcf->directio; 127 of.directio = clcf->directio;
124 of.valid = clcf->open_file_cache_valid; 128 of.valid = clcf->open_file_cache_valid;
136 140
137 case NGX_ENOENT: 141 case NGX_ENOENT:
138 case NGX_ENOTDIR: 142 case NGX_ENOTDIR:
139 case NGX_ENAMETOOLONG: 143 case NGX_ENAMETOOLONG:
140 144
145 r->gzip = 0;
141 return NGX_DECLINED; 146 return NGX_DECLINED;
142 147
143 case NGX_EACCES: 148 case NGX_EACCES:
144 149
145 level = NGX_LOG_ERR; 150 level = NGX_LOG_ERR;