comparison src/http/ngx_http_request.c @ 102:f63280c59dd5 NGINX_0_2_5

nginx 0.2.5 *) Change: the duplicate value of the ngx_http_geo_module variable now causes the warning and changes old value. *) Feature: the ngx_http_ssi_module supports the "set" command. *) Feature: the ngx_http_ssi_module supports the "file" parameter in the "include" command. *) Feature: the ngx_http_ssi_module supports the variable value substitutions in expressions of the "if" command.
author Igor Sysoev <http://sysoev.ru>
date Tue, 04 Oct 2005 00:00:00 +0400
parents ca4f70b3ccc6
children 45f7329b4bd0
comparison
equal deleted inserted replaced
101:5bb09dde34e7 102:f63280c59dd5
421 } 421 }
422 422
423 c->single_connection = 1; 423 c->single_connection = 1;
424 r->connection = c; 424 r->connection = c;
425 425
426 r->main = r;
427
426 r->start_time = ngx_time(); 428 r->start_time = ngx_time();
427 429
428 r->headers_in.content_length_n = -1; 430 r->headers_in.content_length_n = -1;
429 r->headers_in.keep_alive_n = -1; 431 r->headers_in.keep_alive_n = -1;
430 r->headers_out.content_length_n = -1; 432 r->headers_out.content_length_n = -1;
1664 1666
1665 wev->timedout = 0; 1667 wev->timedout = 0;
1666 wev->delayed = 0; 1668 wev->delayed = 0;
1667 1669
1668 if (!wev->ready) { 1670 if (!wev->ready) {
1669 clcf = ngx_http_get_module_loc_conf(r->main ? r->main : r, 1671 clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module);
1670 ngx_http_core_module);
1671 ngx_add_timer(wev, clcf->send_timeout); 1672 ngx_add_timer(wev, clcf->send_timeout);
1672 1673
1673 if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) { 1674 if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
1674 ngx_http_close_request(r, 0); 1675 ngx_http_close_request(r, 0);
1675 ngx_http_close_connection(r->connection); 1676 ngx_http_close_connection(r->connection);
1681 } else { 1682 } else {
1682 if (wev->delayed) { 1683 if (wev->delayed) {
1683 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0, 1684 ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0,
1684 "http writer delayed"); 1685 "http writer delayed");
1685 1686
1686 clcf = ngx_http_get_module_loc_conf(r->main ? r->main : r, 1687 clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module);
1687 ngx_http_core_module);
1688 1688
1689 if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) { 1689 if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
1690 ngx_http_close_request(r, 0); 1690 ngx_http_close_request(r, 0);
1691 ngx_http_close_connection(r->connection); 1691 ngx_http_close_connection(r->connection);
1692 } 1692 }
1710 1710
1711 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0, 1711 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, c->log, 0,
1712 "http writer output filter: %d, \"%V\"", rc, &r->uri); 1712 "http writer output filter: %d, \"%V\"", rc, &r->uri);
1713 1713
1714 if (rc == NGX_AGAIN) { 1714 if (rc == NGX_AGAIN) {
1715 clcf = ngx_http_get_module_loc_conf(r->main ? r->main : r, 1715 clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module);
1716 ngx_http_core_module);
1717 if (!wev->ready && !wev->delayed) { 1716 if (!wev->ready && !wev->delayed) {
1718 ngx_add_timer(wev, clcf->send_timeout); 1717 ngx_add_timer(wev, clcf->send_timeout);
1719 } 1718 }
1720 1719
1721 if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) { 1720 if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
1807 ngx_http_discard_body(ngx_http_request_t *r) 1806 ngx_http_discard_body(ngx_http_request_t *r)
1808 { 1807 {
1809 ssize_t size; 1808 ssize_t size;
1810 ngx_event_t *rev; 1809 ngx_event_t *rev;
1811 1810
1812 if (r->main) { 1811 if (r->main != r) {
1813 return NGX_OK; 1812 return NGX_OK;
1814 } 1813 }
1815 1814
1816 rev = r->connection->read; 1815 rev = r->connection->read;
1817 1816