Mercurial > hg > nginx
diff src/http/modules/ngx_http_gzip_static_module.c @ 1799:0b5b94805d26
optimization
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 27 Dec 2007 20:32:43 +0000 |
parents | 775edc46ee66 |
children | 2547ef00c722 |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_gzip_static_module.c +++ b/src/http/modules/ngx_http_gzip_static_module.c @@ -125,10 +125,9 @@ ngx_http_gzip_static_handler(ngx_http_re of.errors = clcf->open_file_cache_errors; of.events = clcf->open_file_cache_events; - rc = ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool); - - if (rc == NGX_ERROR) { - + if (ngx_open_cached_file(clcf->open_file_cache, &path, &of, r->pool) + != NGX_OK) + { switch (of.err) { case 0: @@ -143,20 +142,18 @@ ngx_http_gzip_static_handler(ngx_http_re case NGX_EACCES: level = NGX_LOG_ERR; - rc = NGX_DECLINED; break; default: level = NGX_LOG_CRIT; - rc = NGX_DECLINED; break; } ngx_log_error(level, log, of.err, ngx_open_file_n " \"%s\" failed", path.data); - return rc; + return NGX_DECLINED; } ngx_log_debug1(NGX_LOG_DEBUG_HTTP, log, 0, "http static fd: %d", of.fd);