comparison src/http/ngx_http_output_filter.c @ 98:c9b243802a17

nginx-0.0.1-2003-05-30-18:27:59 import
author Igor Sysoev <igor@sysoev.ru>
date Fri, 30 May 2003 14:27:59 +0000
parents a23d010f356d
children a059e1aa65d4
comparison
equal deleted inserted replaced
97:70d2345a903f 98:c9b243802a17
117 117
118 if (hunk->type & NGX_HUNK_LAST) { 118 if (hunk->type & NGX_HUNK_LAST) {
119 if (hunk->type & NGX_HUNK_IN_MEMORY) { 119 if (hunk->type & NGX_HUNK_IN_MEMORY) {
120 size = hunk->last - hunk->pos; 120 size = hunk->last - hunk->pos;
121 } else { 121 } else {
122 size = hunk->file_last - hunk->file_pos; 122 size = (size_t) (hunk->file_last - hunk->file_pos);
123 } 123 }
124 124
125 if (size > conf->hunk_size) { 125 if (size > conf->hunk_size) {
126 size = conf->hunk_size; 126 size = conf->hunk_size;
127 } 127 }
199 199
200 if (ctx->incoming->hunk->type & NGX_HUNK_IN_MEMORY) { 200 if (ctx->incoming->hunk->type & NGX_HUNK_IN_MEMORY) {
201 size = ctx->incoming->hunk->last - ctx->incoming->hunk->pos; 201 size = ctx->incoming->hunk->last - ctx->incoming->hunk->pos;
202 202
203 } else { 203 } else {
204 size = ctx->incoming->hunk->file_last 204 size = (size_t) (ctx->incoming->hunk->file_last
205 - ctx->incoming->hunk->file_pos; 205 - ctx->incoming->hunk->file_pos);
206 } 206 }
207 207
208 /* delete the completed hunk from the incoming chain */ 208 /* delete the completed hunk from the incoming chain */
209 if (size == 0) { 209 if (size == 0) {
210 ctx->incoming = ctx->incoming->next; 210 ctx->incoming = ctx->incoming->next;
239 ssize_t n, size; 239 ssize_t n, size;
240 240
241 if (src->type & NGX_HUNK_IN_MEMORY) { 241 if (src->type & NGX_HUNK_IN_MEMORY) {
242 size = src->last - src->pos; 242 size = src->last - src->pos;
243 } else { 243 } else {
244 size = src->file_last - src->file_pos; 244 size = (size_t) (src->file_last - src->file_pos);
245 } 245 }
246 246
247 if (size > (dst->end - dst->pos)) { 247 if (size > (dst->end - dst->pos)) {
248 size = dst->end - dst->pos; 248 size = dst->end - dst->pos;
249 } 249 }