Mercurial > hg > nginx
comparison src/http/modules/ngx_http_range_filter.c @ 110:152567c11325
nginx-0.0.1-2003-07-02-22:51:41 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 02 Jul 2003 18:51:41 +0000 |
parents | 6dfda4cf5200 |
children | d7f606e25b99 |
comparison
equal
deleted
inserted
replaced
109:a9bc21d63fe4 | 110:152567c11325 |
---|---|
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_pool_t *pool); | 12 static int ngx_http_range_filter_init(ngx_cycle_t *cycle, ngx_log_t *log); |
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 */ |
27 ngx_module_t ngx_http_range_filter_module = { | 27 ngx_module_t ngx_http_range_filter_module = { |
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 */ | |
34 NULL /* rollback module */ | |
33 }; | 35 }; |
34 | 36 |
35 | 37 |
36 static int (*next_header_filter) (ngx_http_request_t *r); | 38 static int (*next_header_filter) (ngx_http_request_t *r); |
37 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); | 39 static int (*next_body_filter) (ngx_http_request_t *r, ngx_chain_t *ch); |
352 | 354 |
353 return next_body_filter(r, in); | 355 return next_body_filter(r, in); |
354 } | 356 } |
355 | 357 |
356 | 358 |
357 static int ngx_http_range_filter_init(ngx_pool_t *pool) | 359 static int ngx_http_range_filter_init(ngx_cycle_t *cycle, ngx_log_t *log) |
358 { | 360 { |
359 next_header_filter = ngx_http_top_header_filter; | 361 next_header_filter = ngx_http_top_header_filter; |
360 ngx_http_top_header_filter = ngx_http_range_header_filter; | 362 ngx_http_top_header_filter = ngx_http_range_header_filter; |
361 | 363 |
362 next_body_filter = ngx_http_top_body_filter; | 364 next_body_filter = ngx_http_top_body_filter; |