diff src/http/ngx_http_upstream.c @ 1259:05b5236c2ff5

if subrequest response was buffered in file, then subrequest was finalized with 0 code, ngx_http_writer() was not set, and response part in file was lost
author Igor Sysoev <igor@sysoev.ru>
date Sun, 17 Jun 2007 09:29:15 +0000
parents e84e5b6befe4
children be2b895d31e0
line wrap: on
line diff
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -2157,8 +2157,17 @@ ngx_http_upstream_finalize_request(ngx_h
 
     r->connection->log->action = "sending to client";
 
-    if (rc == 0 && r == r->main && !r->post_action) {
-        rc = ngx_http_send_special(r, NGX_HTTP_LAST);
+    if (rc == 0) {
+        if (r == r->main) {
+            if (!r->post_action) {
+                rc = ngx_http_send_special(r, NGX_HTTP_LAST);
+            }
+
+        } else {
+            if (r->out) {
+                rc = NGX_AGAIN;
+            }
+        }
     }
 
     ngx_http_finalize_request(r, rc);