Mercurial > hg > nginx
comparison src/http/modules/ngx_http_chunked_filter.c @ 290:87e73f067470
nginx-0.0.2-2004-03-16-10:10:12 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 16 Mar 2004 07:10:12 +0000 |
parents | 8dee38ea9117 |
children | a472bfb778b3 |
comparison
equal
deleted
inserted
replaced
289:0750faf8d7e3 | 290:87e73f067470 |
---|---|
54 } | 54 } |
55 | 55 |
56 | 56 |
57 static int ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in) | 57 static int ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in) |
58 { | 58 { |
59 char *chunk; | 59 u_char *chunk; |
60 size_t size, len; | 60 size_t size, len; |
61 ngx_hunk_t *h; | 61 ngx_hunk_t *h; |
62 ngx_chain_t *out, *cl, *tl, **ll; | 62 ngx_chain_t *out, *cl, *tl, **ll; |
63 | 63 |
64 if (in == NULL || !r->chunked) { | 64 if (in == NULL || !r->chunked) { |
85 | 85 |
86 cl = cl->next; | 86 cl = cl->next; |
87 } | 87 } |
88 | 88 |
89 ngx_test_null(chunk, ngx_palloc(r->pool, 11), NGX_ERROR); | 89 ngx_test_null(chunk, ngx_palloc(r->pool, 11), NGX_ERROR); |
90 len = ngx_snprintf(chunk, 11, SIZE_T_X_FMT CRLF, size); | 90 len = ngx_snprintf((char *) chunk, 11, SIZE_T_X_FMT CRLF, size); |
91 | 91 |
92 ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR); | 92 ngx_test_null(h, ngx_calloc_hunk(r->pool), NGX_ERROR); |
93 h->type = NGX_HUNK_IN_MEMORY|NGX_HUNK_TEMP; | 93 h->type = NGX_HUNK_IN_MEMORY|NGX_HUNK_TEMP; |
94 h->pos = chunk; | 94 h->pos = chunk; |
95 h->last = chunk + len; | 95 h->last = chunk + len; |