comparison src/http/modules/ngx_http_range_filter.c @ 113:d7f606e25b99

nginx-0.0.1-2003-07-04-19:10:33 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Jul 2003 15:10:33 +0000
parents 152567c11325
children f6e3c5d019b6
comparison
equal deleted inserted replaced
112:da763a85be66 113:d7f606e25b99
7 typedef struct { 7 typedef struct {
8 ngx_str_t boundary_header; 8 ngx_str_t boundary_header;
9 } ngx_http_range_filter_ctx_t; 9 } ngx_http_range_filter_ctx_t;
10 10
11 11
12 static int ngx_http_range_filter_init(ngx_cycle_t *cycle, ngx_log_t *log); 12 static int ngx_http_range_filter_init(ngx_cycle_t *cycle);
13 13
14 14
15 static ngx_http_module_t ngx_http_range_filter_module_ctx = { 15 static ngx_http_module_t ngx_http_range_filter_module_ctx = {
16 NULL, /* create main configuration */ 16 NULL, /* create main configuration */
17 NULL, /* init main configuration */ 17 NULL, /* init main configuration */
28 NGX_MODULE, 28 NGX_MODULE,
29 &ngx_http_range_filter_module_ctx, /* module context */ 29 &ngx_http_range_filter_module_ctx, /* module context */
30 NULL, /* module directives */ 30 NULL, /* module directives */
31 NGX_HTTP_MODULE, /* module type */ 31 NGX_HTTP_MODULE, /* module type */
32 ngx_http_range_filter_init, /* init module */ 32 ngx_http_range_filter_init, /* init module */
33 NULL, /* commit module */ 33 NULL /* init child */
34 NULL /* rollback module */
35 }; 34 };
36 35
37 36
38 static int (*next_header_filter) (ngx_http_request_t *r); 37 static int (*next_header_filter) (ngx_http_request_t *r);
39 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); 38 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch);
354 353
355 return next_body_filter(r, in); 354 return next_body_filter(r, in);
356 } 355 }
357 356
358 357
359 static int ngx_http_range_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) 358 static int ngx_http_range_filter_init(ngx_cycle_t *cycle)
360 { 359 {
361 next_header_filter = ngx_http_top_header_filter; 360 next_header_filter = ngx_http_top_header_filter;
362 ngx_http_top_header_filter = ngx_http_range_header_filter; 361 ngx_http_top_header_filter = ngx_http_range_header_filter;
363 362
364 next_body_filter = ngx_http_top_body_filter; 363 next_body_filter = ngx_http_top_body_filter;