comparison src/http/ngx_http_write_filter.c @ 303:00c5660d2707

nginx-0.0.3-2004-04-01-20:20:53 import
author Igor Sysoev <igor@sysoev.ru>
date Thu, 01 Apr 2004 16:20:53 +0000
parents 87e73f067470
children ce375c313e96
comparison
equal deleted inserted replaced
302:1526e7686b20 303:00c5660d2707
60 NGX_MODULE, 60 NGX_MODULE,
61 &ngx_http_write_filter_module_ctx, /* module context */ 61 &ngx_http_write_filter_module_ctx, /* module context */
62 ngx_http_write_filter_commands, /* module directives */ 62 ngx_http_write_filter_commands, /* module directives */
63 NGX_HTTP_MODULE, /* module type */ 63 NGX_HTTP_MODULE, /* module type */
64 ngx_http_write_filter_init, /* init module */ 64 ngx_http_write_filter_init, /* init module */
65 NULL /* init child */ 65 NULL /* init process */
66 }; 66 };
67 67
68 68
69 int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in) 69 int ngx_http_write_filter(ngx_http_request_t *r, ngx_chain_t *in)
70 { 70 {
80 if (ctx == NULL) { 80 if (ctx == NULL) {
81 ngx_http_create_ctx(r, ctx, ngx_http_write_filter_module, 81 ngx_http_create_ctx(r, ctx, ngx_http_write_filter_module,
82 sizeof(ngx_http_write_filter_ctx_t), NGX_ERROR); 82 sizeof(ngx_http_write_filter_ctx_t), NGX_ERROR);
83 } 83 }
84 84
85 size = flush = 0; 85 size = 0;
86 flush = 0;
86 last = 0; 87 last = 0;
87 ll = &ctx->out; 88 ll = &ctx->out;
88 89
89 /* find the size, the flush point and the last link of the saved chain */ 90 /* find the size, the flush point and the last link of the saved chain */
90 91