aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_static_handler.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2003-10-10 15:10:50 +0000
committerIgor Sysoev <igor@sysoev.ru>2003-10-10 15:10:50 +0000
commitb3e73d869ecef9248468e0ccc2d7d0abdbee495c (patch)
tree78f032c1884aca4879ef86ce15f10f923111f66e /src/http/modules/ngx_http_static_handler.c
parent1342d9cc29de7b6509a44a49cd66d1038d1e6d26 (diff)
downloadnginx-b3e73d869ecef9248468e0ccc2d7d0abdbee495c.tar.gz
nginx-b3e73d869ecef9248468e0ccc2d7d0abdbee495c.zip
nginx-0.0.1-2003-10-10-19:10:50 import
Diffstat (limited to 'src/http/modules/ngx_http_static_handler.c')
-rw-r--r--src/http/modules/ngx_http_static_handler.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c
index 784f3de4d..b8aa8d443 100644
--- a/src/http/modules/ngx_http_static_handler.c
+++ b/src/http/modules/ngx_http_static_handler.c
@@ -127,33 +127,12 @@ int ngx_http_static_handler(ngx_http_request_t *r)
rc = ngx_http_send_header(r);
- if (rc == NGX_ERROR || rc > NGX_OK) {
- ngx_http_finalize_request(r, rc);
- return NGX_OK;
- }
-
- if (r->header_only) {
- ngx_http_finalize_request(r, rc);
-
-#if 0
- if (rc == NGX_AGAIN) {
- ngx_http_set_write_handler(r);
- } else {
- ngx_http_finalize_request(r, 0);
- }
-#endif
-
- return NGX_OK;
+ if (rc == NGX_ERROR || rc > NGX_OK || r->header_only) {
+ return rc;
}
-
-#if 0
h->type = r->main ? NGX_HUNK_FILE : NGX_HUNK_FILE|NGX_HUNK_LAST;
-#else
- h->type = NGX_HUNK_FILE;
-#endif
-
h->file_pos = 0;
h->file_last = ngx_file_size(r->file.info);
@@ -161,20 +140,5 @@ int ngx_http_static_handler(ngx_http_request_t *r)
h->file->fd = r->file.fd;
h->file->log = r->connection->log;
- rc = ngx_http_output_filter(r, h);
-
- ngx_http_finalize_request(r, rc);
-
-#if 0
- if (r->main == NULL) {
- if (rc == NGX_AGAIN) {
- ngx_http_set_write_handler(r);
-
- } else {
- ngx_http_finalize_request(r, 0);
- }
- }
-#endif
-
- return NGX_OK;
+ return ngx_http_output_filter(r, h);
}