comparison src/http/ngx_http_file_cache.c @ 472:09f0ef15d544 NGINX_0_7_48

nginx 0.7.48 *) Feature: the "proxy_cache_key" directive. *) Bugfix: now nginx takes into account the "X-Accel-Expires", "Expires", and "Cache-Control" header lines in a backend response. *) Bugfix: now nginx caches responses for the GET requests only. *) Bugfix: the "fastcgi_cache_key" directive was not inherited. *) Bugfix: the $arg_... variables did not work with SSI subrequests. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built with uclibc library. Thanks to Timothy Redaelli. *) Bugfix: nginx could not be built on OpenBSD; the bug had appeared in 0.7.46.
author Igor Sysoev <http://sysoev.ru>
date Mon, 06 Apr 2009 00:00:00 +0400
parents 6866b490272e
children f2c6a7373274
comparison
equal deleted inserted replaced
471:0cc33540f2e0 472:09f0ef15d544
1355 1355
1356 for (i = 2; i < cf->args->nelts; i++) { 1356 for (i = 2; i < cf->args->nelts; i++) {
1357 1357
1358 if (ngx_strncmp(value[i].data, "levels=", 7) == 0) { 1358 if (ngx_strncmp(value[i].data, "levels=", 7) == 0) {
1359 1359
1360 n = 0;
1361 p = value[i].data + 7; 1360 p = value[i].data + 7;
1362 last = value[i].data + value[i].len; 1361 last = value[i].data + value[i].len;
1363 1362
1364 while (p < last) { 1363 for (n = 0; n < 3 && p < last; n++) {
1365 1364
1366 if (*p > '0' && *p < '6') { 1365 if (*p > '0' && *p < '3') {
1367 1366
1368 cache->path->level[n] = *p++ - '0'; 1367 cache->path->level[n] = *p++ - '0';
1369 cache->path->len += cache->path->level[n] + 1; 1368 cache->path->len += cache->path->level[n] + 1;
1370 1369
1371 if (p == last) { 1370 if (p == last) {
1372 break; 1371 break;
1373 } 1372 }
1374 1373
1375 if (*p++ == ':') { 1374 if (*p++ == ':' && n < 2 && p != last) {
1376
1377 if (n > 2) {
1378 goto invalid_levels;
1379 }
1380
1381 if (cache->path->level[n] == 0) {
1382 goto invalid_levels;
1383 }
1384
1385 n++;
1386
1387 continue; 1375 continue;
1388 } 1376 }
1377
1378 goto invalid_levels;
1389 } 1379 }
1390 1380
1391 goto invalid_levels; 1381 goto invalid_levels;
1392 } 1382 }
1393 1383