nginx-0.3.20-RELEASE import
*) Bugfix: in SSI handling.
*) Bugfix: the ngx_http_memcached_module did not support the keys in
the "/usr?args" form.
diff --git a/src/http/ngx_http_request.c b/src/http/ngx_http_request.c
index f182633..7fddde0 100644
--- a/src/http/ngx_http_request.c
+++ b/src/http/ngx_http_request.c
@@ -1423,7 +1423,7 @@
return;
}
- if (r->main == r) {
+ if (r == r->main) {
if (r->connection->read->timer_set) {
ngx_del_timer(r->connection->read);
}
@@ -1438,7 +1438,7 @@
return;
}
- if (r->main != r || rc == NGX_AGAIN) {
+ if (r != r->main || rc == NGX_AGAIN) {
if (ngx_http_set_write_handler(r) != NGX_OK) {
return;
}
@@ -1453,7 +1453,7 @@
return;
}
- if (r->main != r) {
+ if (r != r->main) {
pr = r->parent;
@@ -1461,7 +1461,7 @@
"http parent request: \"%V?%V\"", &pr->uri, &pr->args);
if (rc != NGX_AGAIN) {
- pr->connection->data = pr;
+ r->connection->data = pr;
}
if (pr->postponed) {
@@ -1472,12 +1472,22 @@
if (rc != NGX_AGAIN && pr->postponed->request == r) {
pr->postponed = pr->postponed->next;
-
- if (pr->postponed == NULL) {
- return;
- }
}
+ if (r->fast_subrequest) {
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http fast subrequest: \"%V?%V\" done",
+ &r->uri, &r->args);
+ return;
+ }
+
+ ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
+ "http wake parent request: \"%V?%V\"",
+ &pr->uri, &pr->args);
+
+ pr->write_event_handler(pr);
+
+#if 0
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http request: \"%V?%V\" still has postponed",
&pr->uri, &pr->args);
@@ -1489,6 +1499,8 @@
pr->write_event_handler(pr);
}
+#endif
+
}
return;
@@ -1498,7 +1510,7 @@
return;
}
- if (r->out) {
+ if (r->connection->buffered) {
(void) ngx_http_set_write_handler(r);
return;
}
@@ -1655,7 +1667,11 @@
ngx_http_close_request(r, 0);
}
- return;
+ if (r == r->main) {
+ return;
+ }
+
+ rc = NGX_OK;
}
ngx_log_debug2(NGX_LOG_DEBUG_HTTP, wev->log, 0,
@@ -1691,7 +1707,7 @@
ssize_t size;
ngx_event_t *rev;
- if (r->main != r) {
+ if (r != r->main) {
return NGX_OK;
}