diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-12-01 16:28:14 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-12-01 16:28:14 +0000 |
commit | 4fc368fa3019e06e0de9acd58b8035751c74e38f (patch) | |
tree | 066a04f598a307113523abf29c61074aec8f3158 /src/http/modules/ngx_http_static_handler.c | |
parent | 865c150cb473fca8ff91d60ddd539ac6dbbe02ee (diff) | |
download | nginx-4fc368fa3019e06e0de9acd58b8035751c74e38f.tar.gz nginx-4fc368fa3019e06e0de9acd58b8035751c74e38f.zip |
nginx-0.0.1-2003-12-01-19:28:14 import
Diffstat (limited to 'src/http/modules/ngx_http_static_handler.c')
-rw-r--r-- | src/http/modules/ngx_http_static_handler.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c index 1c754a050..31dd1fb58 100644 --- a/src/http/modules/ngx_http_static_handler.c +++ b/src/http/modules/ngx_http_static_handler.c @@ -91,7 +91,7 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r) * and it must be already registered in r->cleanup */ - if (r->cache && r->cache->valid) { + if (r->cache && !r->cache->expired) { return ngx_http_send_cached(r); } @@ -146,7 +146,7 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r) ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http open file cache get: " PTR_FMT, file); - if (file && file->valid) { + if (file && !file->expired) { r->cache = file; return ngx_http_send_cached(r); } @@ -165,7 +165,7 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r) ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http redirect cache get: " PTR_FMT, redirect); - if (redirect && redirect->valid) { + if (redirect && !redirect->expired) { /* * We do not copy a cached value so the cache entry is locked @@ -336,7 +336,6 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r) redirect->accessed = ngx_cached_time; redirect->last_modified = 0; redirect->updated = ngx_cached_time; - redirect->valid = 1; redirect->memory = 1; ngx_http_cache_unlock(slcf->redirect_cache, redirect, log); redirect_cleanup->valid = 0; @@ -375,7 +374,7 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r) } file->accessed = ngx_cached_time; file->updated = ngx_cached_time; - file->valid = 1; + file->expired = 0; r->cache = file; return ngx_http_send_cached(r); @@ -409,7 +408,6 @@ static ngx_int_t ngx_http_static_handler(ngx_http_request_t *r) file->accessed = ngx_cached_time; file->last_modified = ngx_file_mtime(&fi); file->updated = ngx_cached_time; - file->valid = 1; r->cache = file; } |