Mercurial > hg > nginx
comparison src/http/ngx_http_write_filter.c @ 8:708f8bb772ec
nginx-0.0.1-2002-09-02-18:48:24 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 02 Sep 2002 14:48:24 +0000 |
parents | c5f071d376e5 |
children | 6f58641241bb |
comparison
equal
deleted
inserted
replaced
7:b5481d6fbbd4 | 8:708f8bb772ec |
---|---|
1 | 1 |
2 #include <ngx_config.h> | 2 #include <ngx_config.h> |
3 | 3 |
4 #include <ngx_hunk.h> | 4 #include <ngx_hunk.h> |
5 #include <ngx_event_write.h> | |
5 #include <ngx_http.h> | 6 #include <ngx_http.h> |
6 #include <ngx_http_filter.h> | 7 #include <ngx_http_output_filter.h> |
7 #include <ngx_event_write.h> | |
8 | 8 |
9 #include <ngx_http_write_filter.h> | 9 #include <ngx_http_write_filter.h> |
10 | 10 |
11 | 11 |
12 ngx_http_module_t ngx_http_write_filter_module; | 12 ngx_http_module_t ngx_http_write_filter_module; |
46 | 46 |
47 ngx_log_debug(r->connection->log, "old chunk: %x " QX_FMT " " QD_FMT _ | 47 ngx_log_debug(r->connection->log, "old chunk: %x " QX_FMT " " QD_FMT _ |
48 ch->hunk->type _ ch->hunk->pos.file _ | 48 ch->hunk->type _ ch->hunk->pos.file _ |
49 ch->hunk->last.file - ch->hunk->pos.file); | 49 ch->hunk->last.file - ch->hunk->pos.file); |
50 | 50 |
51 if (ch->hunk->type & NGX_HUNK_FLUSH) | 51 if (ch->hunk->type & NGX_HUNK_FLUSH|NGX_HUNK_RECYCLED) |
52 flush = size; | 52 flush = size; |
53 | 53 |
54 if (ch->hunk->type & NGX_HUNK_LAST) | 54 if (ch->hunk->type & NGX_HUNK_LAST) |
55 last = 1; | 55 last = 1; |
56 } | 56 } |
67 | 67 |
68 ngx_log_debug(r->connection->log, "new chunk: %x " QX_FMT " " QD_FMT _ | 68 ngx_log_debug(r->connection->log, "new chunk: %x " QX_FMT " " QD_FMT _ |
69 ch->hunk->type _ ch->hunk->pos.file _ | 69 ch->hunk->type _ ch->hunk->pos.file _ |
70 ch->hunk->last.file - ch->hunk->pos.file); | 70 ch->hunk->last.file - ch->hunk->pos.file); |
71 | 71 |
72 if (ch->hunk->type & NGX_HUNK_FLUSH) | 72 if (ch->hunk->type & NGX_HUNK_FLUSH|NGX_HUNK_RECYCLED) |
73 flush = size; | 73 flush = size; |
74 | 74 |
75 if (ch->hunk->type & NGX_HUNK_LAST) | 75 if (ch->hunk->type & NGX_HUNK_LAST) |
76 last = 1; | 76 last = 1; |
77 } | 77 } |
83 if (chain == (ngx_chain_t *) -1) | 83 if (chain == (ngx_chain_t *) -1) |
84 return NGX_ERROR; | 84 return NGX_ERROR; |
85 | 85 |
86 ctx->out = chain; | 86 ctx->out = chain; |
87 | 87 |
88 ngx_log_debug(r->connection->log, "write filter %x" _ chain); | |
89 | |
88 return (chain ? NGX_AGAIN : NGX_OK); | 90 return (chain ? NGX_AGAIN : NGX_OK); |
89 } | 91 } |