diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-10-21 16:49:56 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-10-21 16:49:56 +0000 |
commit | 419f9aceb4d994c2f7f51400f59fb2da0ed666d4 (patch) | |
tree | e32162d1d3833491fc1a95780880099f2ef6857f /src/http/modules/ngx_http_static_handler.c | |
parent | 9760a1336f0eb4057b6e2ccdd4b0145087102b17 (diff) | |
download | nginx-419f9aceb4d994c2f7f51400f59fb2da0ed666d4.tar.gz nginx-419f9aceb4d994c2f7f51400f59fb2da0ed666d4.zip |
nginx-0.0.1-2003-10-21-20:49:56 import
Diffstat (limited to 'src/http/modules/ngx_http_static_handler.c')
-rw-r--r-- | src/http/modules/ngx_http_static_handler.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_static_handler.c b/src/http/modules/ngx_http_static_handler.c index 8b414d76d..f4955ef3d 100644 --- a/src/http/modules/ngx_http_static_handler.c +++ b/src/http/modules/ngx_http_static_handler.c @@ -191,6 +191,7 @@ static int ngx_http_static_handler(ngx_http_request_t *r) ngx_log_e level; ngx_err_t err; ngx_hunk_t *h; + ngx_chain_t out; ngx_http_type_t *type; ngx_http_log_ctx_t *ctx; ngx_http_core_loc_conf_t *clcf; @@ -257,7 +258,7 @@ static int ngx_http_static_handler(ngx_http_request_t *r) #endif r->headers_out.status = NGX_HTTP_OK; - r->headers_out.content_length = ngx_file_size(r->file.info); + r->headers_out.content_length_n = ngx_file_size(r->file.info); r->headers_out.last_modified_time = ngx_file_mtime(r->file.info); ngx_test_null(r->headers_out.content_type, @@ -317,7 +318,10 @@ static int ngx_http_static_handler(ngx_http_request_t *r) h->file->fd = r->file.fd; h->file->log = r->connection->log; - return ngx_http_output_filter(r, h); + out.hunk = h; + out.next = NULL; + + return ngx_http_output_filter(r, &out); } |