diff src/http/ngx_http_copy_filter_module.c @ 829:362d156f0278

high level HTTP buffered flags should be on per-subrequest basis, this fix a bug in SSI when a big static file is included
author Igor Sysoev <igor@sysoev.ru>
date Mon, 30 Oct 2006 20:25:22 +0000
parents 7e24168b0853
children 05b5236c2ff5
line wrap: on
line diff
--- a/src/http/ngx_http_copy_filter_module.c
+++ b/src/http/ngx_http_copy_filter_module.c
@@ -109,12 +109,20 @@ ngx_http_copy_filter(ngx_http_request_t 
 
     rc = ngx_output_chain(ctx, in);
 
+    if (!c->destroyed) {
+
+        if (ctx->in == NULL) {
+            r->buffered &= ~NGX_HTTP_COPY_BUFFERED;
+        } else {
+            r->buffered |= NGX_HTTP_COPY_BUFFERED;
+        }
+
 #if (NGX_DEBUG)
-    if (!c->destroyed) {
         ngx_log_debug3(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
                        "copy filter: %i \"%V?%V\"", rc, &r->uri, &r->args);
+#endif
+
     }
-#endif
 
     return rc;
 }