Mercurial > hg > nginx-quic
comparison src/http/modules/ngx_http_static_handler.c @ 153:c71aeb75c071
nginx-0.0.1-2003-10-21-20:49:56 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 21 Oct 2003 16:49:56 +0000 |
parents | 5afee0074707 |
children | e7e094d34162 |
comparison
equal
deleted
inserted
replaced
152:fb48bf4fea1c | 153:c71aeb75c071 |
---|---|
189 { | 189 { |
190 int rc, key, i; | 190 int rc, key, i; |
191 ngx_log_e level; | 191 ngx_log_e level; |
192 ngx_err_t err; | 192 ngx_err_t err; |
193 ngx_hunk_t *h; | 193 ngx_hunk_t *h; |
194 ngx_chain_t out; | |
194 ngx_http_type_t *type; | 195 ngx_http_type_t *type; |
195 ngx_http_log_ctx_t *ctx; | 196 ngx_http_log_ctx_t *ctx; |
196 ngx_http_core_loc_conf_t *clcf; | 197 ngx_http_core_loc_conf_t *clcf; |
197 | 198 |
198 rc = ngx_http_discard_body(r); | 199 rc = ngx_http_discard_body(r); |
255 } | 256 } |
256 | 257 |
257 #endif | 258 #endif |
258 | 259 |
259 r->headers_out.status = NGX_HTTP_OK; | 260 r->headers_out.status = NGX_HTTP_OK; |
260 r->headers_out.content_length = ngx_file_size(r->file.info); | 261 r->headers_out.content_length_n = ngx_file_size(r->file.info); |
261 r->headers_out.last_modified_time = ngx_file_mtime(r->file.info); | 262 r->headers_out.last_modified_time = ngx_file_mtime(r->file.info); |
262 | 263 |
263 ngx_test_null(r->headers_out.content_type, | 264 ngx_test_null(r->headers_out.content_type, |
264 ngx_push_table(r->headers_out.headers), | 265 ngx_push_table(r->headers_out.headers), |
265 NGX_HTTP_INTERNAL_SERVER_ERROR); | 266 NGX_HTTP_INTERNAL_SERVER_ERROR); |
315 h->file_last = ngx_file_size(r->file.info); | 316 h->file_last = ngx_file_size(r->file.info); |
316 | 317 |
317 h->file->fd = r->file.fd; | 318 h->file->fd = r->file.fd; |
318 h->file->log = r->connection->log; | 319 h->file->log = r->connection->log; |
319 | 320 |
320 return ngx_http_output_filter(r, h); | 321 out.hunk = h; |
322 out.next = NULL; | |
323 | |
324 return ngx_http_output_filter(r, &out); | |
321 } | 325 } |
322 | 326 |
323 | 327 |
324 static int ngx_http_static_init(ngx_cycle_t *cycle) | 328 static int ngx_http_static_init(ngx_cycle_t *cycle) |
325 { | 329 { |