comparison src/http/ngx_http_output_filter.c @ 45:f1ee46c036a4

nginx-0.0.1-2003-01-10-09:09:20 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 10 Jan 2003 06:09:20 +0000
parents 0e81ac0bb3e2
children d81326c3b21b
comparison
equal deleted inserted replaced
44:0e81ac0bb3e2 45:f1ee46c036a4
66 ngx_http_output_filter_ctx_t *ctx; 66 ngx_http_output_filter_ctx_t *ctx;
67 ngx_http_output_filter_conf_t *conf; 67 ngx_http_output_filter_conf_t *conf;
68 68
69 ctx = (ngx_http_output_filter_ctx_t *) 69 ctx = (ngx_http_output_filter_ctx_t *)
70 ngx_http_get_module_ctx(r->main ? r->main : r, 70 ngx_http_get_module_ctx(r->main ? r->main : r,
71 ngx_http_output_filter_module_ctx); 71 ngx_http_output_filter_module);
72 72
73 if (ctx == NULL) { 73 if (ctx == NULL) {
74 ngx_http_create_ctx(r, ctx, 74 ngx_http_create_ctx(r, ctx, ngx_http_output_filter_module,
75 ngx_http_output_filter_module_ctx,
76 sizeof(ngx_http_output_filter_ctx_t)); 75 sizeof(ngx_http_output_filter_ctx_t));
77 } 76 }
78 77
79 if (hunk && (hunk->type & NGX_HUNK_LAST)) { 78 if (hunk && (hunk->type & NGX_HUNK_LAST)) {
80 ctx->last = 1; 79 ctx->last = 1;
181 if (ctx->hunk == NULL) { 180 if (ctx->hunk == NULL) {
182 181
183 if (hunk->type & NGX_HUNK_LAST) { 182 if (hunk->type & NGX_HUNK_LAST) {
184 183
185 conf = (ngx_http_output_filter_conf_t *) 184 conf = (ngx_http_output_filter_conf_t *)
186 ngx_http_get_module_loc_conf( 185 ngx_http_get_module_loc_conf(
187 r->main ? r->main : r, 186 r->main ? r->main : r,
188 ngx_http_output_filter_module_ctx); 187 ngx_http_output_filter_module);
189 188
190 size = hunk->last.mem - hunk->pos.mem; 189 size = hunk->last.mem - hunk->pos.mem;
191 if (size > conf->hunk_size) { 190 if (size > conf->hunk_size) {
192 size = conf->hunk_size; 191 size = conf->hunk_size;
193 } 192 }