comparison src/http/ngx_http_upstream.c @ 1958:3e9e4581fbba

fix peer sendfile capability
author Igor Sysoev <igor@sysoev.ru>
date Fri, 04 Apr 2008 12:07:13 +0000
parents 94b03bbd328e
children 4f16186f5603
comparison
equal deleted inserted replaced
1957:fe30478341f0 1958:3e9e4581fbba
331 return; 331 return;
332 } 332 }
333 333
334 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module); 334 clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
335 335
336 u->output.sendfile = c->sendfile;
337 u->output.pool = r->pool; 336 u->output.pool = r->pool;
338 u->output.bufs.num = 1; 337 u->output.bufs.num = 1;
339 u->output.bufs.size = clcf->client_body_buffer_size; 338 u->output.bufs.size = clcf->client_body_buffer_size;
340 u->output.output_filter = ngx_chain_writer; 339 u->output.output_filter = ngx_chain_writer;
341 u->output.filter_ctx = &u->writer; 340 u->output.filter_ctx = &u->writer;
700 699
701 c->write->handler = ngx_http_upstream_send_request_handler; 700 c->write->handler = ngx_http_upstream_send_request_handler;
702 c->read->handler = ngx_http_upstream_process_header; 701 c->read->handler = ngx_http_upstream_process_header;
703 702
704 c->sendfile &= r->connection->sendfile; 703 c->sendfile &= r->connection->sendfile;
704 u->output.sendfile = c->sendfile;
705 705
706 c->pool = r->pool; 706 c->pool = r->pool;
707 c->read->log = c->write->log = c->log = r->connection->log; 707 c->read->log = c->write->log = c->log = r->connection->log;
708 708
709 /* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */ 709 /* init or reinit the ngx_output_chain() and ngx_chain_writer() contexts */