comparison src/core/ngx_output_chain.c @ 452:23fb87bddda1 release-0.1.1

nginx-0.1.1-RELEASE import *) Feature: the gzip_types directive. *) Feature: the tcp_nodelay directive. *) Feature: the send_lowat directive is working not only on OSes that support kqueue NOTE_LOWAT, but also on OSes that support SO_SNDLOWAT. *) Feature: the setproctitle() emulation for Linux and Solaris. *) Bugfix: the "Location" header rewrite bug fixed while the proxying. *) Bugfix: the ngx_http_chunked_module module may get caught in an endless loop. *) Bugfix: the /dev/poll module bugs fixed. *) Bugfix: the responses were corrupted when the temporary files were used while the proxying. *) Bugfix: the unescaped requests were passed to the backend. *) Bugfix: while the build configuration on Linux 2.4 the --with-poll_module parameter was required.
author Igor Sysoev <igor@sysoev.ru>
date Mon, 11 Oct 2004 15:07:03 +0000
parents 42d11f017717
children 295d97d70c69
comparison
equal deleted inserted replaced
451:f40362e47689 452:23fb87bddda1
226 if (ngx_buf_in_memory(src)) { 226 if (ngx_buf_in_memory(src)) {
227 ngx_memcpy(dst->pos, src->pos, size); 227 ngx_memcpy(dst->pos, src->pos, size);
228 src->pos += size; 228 src->pos += size;
229 dst->last += size; 229 dst->last += size;
230 230
231 if (src->in_file) { 231 if (src->in_file && sendfile) {
232 dst->in_file = 1;
233 dst->file = src->file;
234 dst->file_pos = src->file_pos;
232 src->file_pos += size; 235 src->file_pos += size;
236 dst->file_last = src->file_pos;
237
238 } else {
239 dst->in_file = 0;
233 } 240 }
234 241
235 if (src->last_buf && src->pos == src->last) { 242 if (src->last_buf && src->pos == src->last) {
236 dst->last_buf = 1; 243 dst->last_buf = 1;
237 } 244 }
256 if (n == 0) { 263 if (n == 0) {
257 return NGX_ERROR; 264 return NGX_ERROR;
258 } 265 }
259 } 266 }
260 267
261 src->file_pos += n;
262 dst->last += n; 268 dst->last += n;
263 269
264 if (!sendfile) { 270 if (sendfile) {
271 dst->in_file = 1;
272 dst->file = src->file;
273 dst->file_pos = src->file_pos;
274 src->file_pos += size;
275 dst->file_last = src->file_pos;
276
277 } else {
265 dst->in_file = 0; 278 dst->in_file = 0;
279 src->file_pos += n;
266 } 280 }
267 281
268 if (src->last_buf && src->file_pos == src->file_last) { 282 if (src->last_buf && src->file_pos == src->file_last) {
269 dst->last_buf = 1; 283 dst->last_buf = 1;
270 } 284 }