aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_request.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-10-04 10:38:53 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-10-04 10:38:53 +0000
commitf6e1fe3f28ee43792a4543e8b9e8702713c5b74a (patch)
tree67cd150690123c53effef3aac42cca767ceafbbf /src/http/ngx_http_request.c
parent4dabff2624d4bae5e9cae37fb80d864501481432 (diff)
downloadnginx-f6e1fe3f28ee43792a4543e8b9e8702713c5b74a.tar.gz
nginx-f6e1fe3f28ee43792a4543e8b9e8702713c5b74a.zip
nginx-0.2.5-RELEASE importrelease-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.
Diffstat (limited to 'src/http/ngx_http_request.c')
-rw-r--r--src/http/ngx_http_request.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index 0e6613b51..704d373b6 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -423,6 +423,8 @@ void ngx_http_init_request(ngx_event_t *rev)
c->single_connection = 1;
r->connection = c;
+ r->main = r;
+
r->start_time = ngx_time();
r->headers_in.content_length_n = -1;
@@ -1666,8 +1668,7 @@ ngx_http_writer(ngx_http_request_t *r)
wev->delayed = 0;
if (!wev->ready) {
- clcf = ngx_http_get_module_loc_conf(r->main ? r->main : r,
- ngx_http_core_module);
+ clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module);
ngx_add_timer(wev, clcf->send_timeout);
if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
@@ -1683,8 +1684,7 @@ ngx_http_writer(ngx_http_request_t *r)
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, wev->log, 0,
"http writer delayed");
- clcf = ngx_http_get_module_loc_conf(r->main ? r->main : r,
- ngx_http_core_module);
+ clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module);
if (ngx_handle_write_event(wev, clcf->send_lowat) == NGX_ERROR) {
ngx_http_close_request(r, 0);
@@ -1712,8 +1712,7 @@ ngx_http_writer(ngx_http_request_t *r)
"http writer output filter: %d, \"%V\"", rc, &r->uri);
if (rc == NGX_AGAIN) {
- clcf = ngx_http_get_module_loc_conf(r->main ? r->main : r,
- ngx_http_core_module);
+ clcf = ngx_http_get_module_loc_conf(r->main, ngx_http_core_module);
if (!wev->ready && !wev->delayed) {
ngx_add_timer(wev, clcf->send_timeout);
}
@@ -1809,7 +1808,7 @@ ngx_http_discard_body(ngx_http_request_t *r)
ssize_t size;
ngx_event_t *rev;
- if (r->main) {
+ if (r->main != r) {
return NGX_OK;
}