comparison src/http/ngx_http_write_filter.c @ 99:a059e1aa65d4

nginx-0.0.1-2003-06-02-19:24:30 import
author Igor Sysoev <igor@sysoev.ru>
date Mon, 02 Jun 2003 15:24:30 +0000
parents a23d010f356d
children 6dfda4cf5200
comparison
equal deleted inserted replaced
98:c9b243802a17 99:a059e1aa65d4
1 1
2 #include <ngx_config.h> 2 #include <ngx_config.h>
3 #include <ngx_core.h>
4 #include <ngx_http.h>
3 5
4 #include <ngx_core.h>
5 #include <ngx_hunk.h>
6 #include <ngx_conf_file.h>
7 #include <ngx_connection.h>
8 6
9 #include <ngx_event_write.h> 7 typedef struct {
8 size_t buffer_output;
9 } ngx_http_write_filter_conf_t;
10 10
11 #include <ngx_http.h> 11
12 #include <ngx_http_config.h> 12 typedef struct {
13 #include <ngx_http_write_filter.h> 13 ngx_chain_t *out;
14 } ngx_http_write_filter_ctx_t;
14 15
15 16
16 static void *ngx_http_write_filter_create_conf(ngx_pool_t *pool); 17 static void *ngx_http_write_filter_create_conf(ngx_pool_t *pool);
17 static char *ngx_http_write_filter_merge_conf(ngx_pool_t *pool, 18 static char *ngx_http_write_filter_merge_conf(ngx_pool_t *pool,
18 void *parent, void *child); 19 void *parent, void *child);
94 } 95 }
95 96
96 /* add the new chain to the existent one */ 97 /* add the new chain to the existent one */
97 98
98 for (/* void */; in; in = in->next) { 99 for (/* void */; in; in = in->next) {
99 ngx_test_null(ce, ngx_palloc(r->pool, sizeof(ngx_chain_t)), NGX_ERROR); 100 ngx_test_null(ce, ngx_alloc_chain_entry(r->pool), NGX_ERROR);
100 101
101 ce->hunk = in->hunk; 102 ce->hunk = in->hunk;
102 ce->next = NULL; 103 ce->next = NULL;
103 *le = ce; 104 *le = ce;
104 le = &ce->next; 105 le = &ce->next;