Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nginx/nginx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-05-15 19:42:53 +0400
committerIgor Sysoev <igor@sysoev.ru>2003-05-15 19:42:53 +0400
commit6ddfbf06625eca15ddf24ac95b755cdc9db32bfa (patch)
treefdf4cccdd271b3fce401cff82c911aeb2a390703 /src/http/modules
parent79a804880ee362a1256e6e8aeadb73f7f5cf0885 (diff)
nginx-0.0.1-2003-05-15-19:42:53 import
Diffstat (limited to 'src/http/modules')
-rw-r--r--src/http/modules/ngx_http_index_handler.c5
-rw-r--r--src/http/modules/ngx_http_static_handler.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/src/http/modules/ngx_http_index_handler.c b/src/http/modules/ngx_http_index_handler.c
index deefae3c4..4af3c946b 100644
--- a/src/http/modules/ngx_http_index_handler.c
+++ b/src/http/modules/ngx_http_index_handler.c
@@ -28,9 +28,10 @@ static ngx_command_t ngx_http_index_commands[] = {
NGX_HTTP_LOC_CONF|NGX_CONF_ANY,
ngx_http_index_set_index,
NGX_HTTP_LOC_CONF_OFFSET,
- 0},
+ 0,
+ NULL},
- {ngx_string(""), 0, NULL, 0, 0}
+ {ngx_string(""), 0, NULL, 0, 0, NULL}
};
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c
index e2bbc93b7..41f134286 100644
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -34,7 +34,12 @@ int ngx_http_static_handler(ngx_http_request_t *r)
#endif
- ngx_http_discard_body(r);
+ rc = ngx_http_discard_body(r);
+
+ if (rc != NGX_OK) {
+ return rc;
+ }
+
ctx = r->connection->log->data;
ctx->action = "sending response";
@@ -74,7 +79,7 @@ int ngx_http_static_handler(ngx_http_request_t *r)
r->file.info_valid = 1;
}
-#if !(WIN32) /* not regular files is probably Unix specific */
+#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,