]> git.kaiwu.me - nginx.git/commitdiff
Merge of r4612: proper subrequest handling in various modules.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 4 Jun 2012 10:27:00 +0000 (10:27 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 4 Jun 2012 10:27:00 +0000 (10:27 +0000)
src/http/modules/ngx_http_flv_module.c
src/http/modules/ngx_http_gzip_static_module.c
src/http/modules/ngx_http_mp4_module.c
src/http/modules/ngx_http_stub_status_module.c

index 719a0112499265f2129c93d63369a16da6fba91b..03a74680379ee42273ecdfb91927ef725f7e9924 100644 (file)
@@ -235,7 +235,7 @@ ngx_http_flv_handler(ngx_http_request_t *r)
     b->file_last = of.size;
 
     b->in_file = b->file_last ? 1: 0;
-    b->last_buf = 1;
+    b->last_buf = (r == r->main) ? 1 : 0;
     b->last_in_chain = 1;
 
     b->file->fd = of.fd;
index 46ce8f3f3274137df60bd0d818dab431059a267e..b0183e0aaa1dcf35d5eb0c3c9741f0a2e796039a 100644 (file)
@@ -245,7 +245,7 @@ ngx_http_gzip_static_handler(ngx_http_request_t *r)
     b->file_last = of.size;
 
     b->in_file = b->file_last ? 1 : 0;
-    b->last_buf = 1;
+    b->last_buf = (r == r->main) ? 1 : 0;
     b->last_in_chain = 1;
 
     b->file->fd = of.fd;
index 433e118a227c3b94baaf265331556398b2c9f723..2c8cfd171ada349b9adcc112d4fc810420e61722 100644 (file)
@@ -616,7 +616,7 @@ ngx_http_mp4_handler(ngx_http_request_t *r)
     b->file_last = of.size;
 
     b->in_file = b->file_last ? 1 : 0;
-    b->last_buf = 1;
+    b->last_buf = (r == r->main) ? 1 : 0;
     b->last_in_chain = 1;
 
     b->file->fd = of.fd;
index f780869811d471464b7cac0f33b8efb3b261eb64..96abe928ae807c7bb644e9ce5c66374218ae206a 100644 (file)
@@ -121,7 +121,7 @@ static ngx_int_t ngx_http_status_handler(ngx_http_request_t *r)
     r->headers_out.status = NGX_HTTP_OK;
     r->headers_out.content_length_n = b->last - b->pos;
 
-    b->last_buf = 1;
+    b->last_buf = (r == r->main) ? 1 : 0;
 
     rc = ngx_http_send_header(r);