Mercurial > hg > nginx
diff src/http/modules/ngx_http_static_handler.c @ 287:35a6a9df2d25
nginx-0.0.2-2004-03-12-19:57:08 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 12 Mar 2004 16:57:08 +0000 |
parents | 70e1c7d2b83d |
children | f81d075ad172 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_static_handler.c Thu Mar 11 21:34:52 2004 +0000 +++ b/src/http/modules/ngx_http_static_handler.c Fri Mar 12 16:57:08 2004 +0000 @@ -18,6 +18,8 @@ static ngx_command_t ngx_http_static_commands[] = { +#if (NGX_HTTP_CACHE) + { ngx_string("redirect_cache"), NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE3, ngx_http_set_cache_slot, @@ -25,6 +27,8 @@ offsetof(ngx_http_static_loc_conf_t, redirect_cache), NULL }, +#endif + ngx_null_command }; @@ -87,6 +91,8 @@ return rc; } +#if (NGX_HTTP_CACHE) + /* * there is a valid cached open file, i.e by the index handler, * and it should be already registered in r->cleanup @@ -96,6 +102,8 @@ return ngx_http_send_cached(r); } +#endif + log = r->connection->log; clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); @@ -138,6 +146,7 @@ redirect_cleanup = NULL; } +#if (NGX_HTTP_CACHE) /* look up an open files cache */ @@ -192,6 +201,7 @@ redirect = NULL; } +#endif /* open file */ @@ -302,6 +312,8 @@ r->headers_out.location->value = location; +#if (NGX_HTTP_CACHE) + if (slcf->redirect_cache) { if (redirect) { if (location.len == redirect->data.value.len @@ -345,6 +357,8 @@ } +#endif + return NGX_HTTP_MOVED_PERMANENTLY; } @@ -365,6 +379,8 @@ #endif +#if (NGX_HTTP_CACHE) + if (clcf->open_files) { #if (NGX_USE_HTTP_FILE_CACHE_UNIQ) @@ -416,6 +432,7 @@ return ngx_http_send_cached(r); } +#endif ctx = log->data; ctx->action = "sending response to client";