aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_static_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-11-09 20:03:38 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-11-09 20:03:38 +0000
commit74e95c224ad84c6b84b5a834f49c014a441916b5 (patch)
treefea6b4e7b2706f089e462d201e90ec95f5a98fa2 /src/http/modules/ngx_http_static_handler.c
parente8732b06b94ea5f8a25fa3e71cece7d93f5ac0b8 (diff)
downloadnginx-74e95c224ad84c6b84b5a834f49c014a441916b5.tar.gz
nginx-74e95c224ad84c6b84b5a834f49c014a441916b5.zip
nginx-0.0.1-2003-11-09-23:03:38 import; separate building
Diffstat (limited to 'src/http/modules/ngx_http_static_handler.c')
-rw-r--r--src/http/modules/ngx_http_static_handler.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c
index ad2669be6..9849dbf34 100644
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -158,22 +158,6 @@ ngx_log_debug(r->connection->log, "FILE: %d" _ r->file.fd);
r->file.info_valid = 1;
}
-#if !(WIN32) /* the not regular files are probably Unix specific */
-
- if (!ngx_is_file(r->file.info)) {
- ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
- "%s is not a regular file", r->file.name.data);
-
- if (ngx_close_file(r->file.fd) == NGX_FILE_ERROR)
- ngx_log_error(NGX_LOG_ALERT, r->connection->log, ngx_errno,
- ngx_close_file_n " %s failed", r->file.name.data);
-
- return NGX_HTTP_NOT_FOUND;
- }
-
-#endif
-#endif
-
if (ngx_is_dir(r->file.info)) {
ngx_log_debug(r->connection->log, "HTTP DIR: '%s'" _ r->file.name.data);
@@ -203,6 +187,22 @@ ngx_log_debug(r->connection->log, "HTTP DIR: '%s'" _ r->file.name.data);
return NGX_HTTP_MOVED_PERMANENTLY;
}
+#if !(WIN32) /* the not regular files are probably Unix specific */
+
+ if (!ngx_is_file(r->file.info)) {
+ ngx_log_error(NGX_LOG_CRIT, r->connection->log, ngx_errno,
+ "%s is not a regular file", r->file.name.data);
+
+ if (ngx_close_file(r->file.fd) == NGX_FILE_ERROR)
+ ngx_log_error(NGX_LOG_ALERT, r->connection->log, ngx_errno,
+ ngx_close_file_n " %s failed", r->file.name.data);
+
+ return NGX_HTTP_NOT_FOUND;
+ }
+
+#endif
+#endif
+
r->content_handler = ngx_http_static_handler;
return NGX_OK;