]> git.kaiwu.me - nginx.git/commitdiff
inherit flush flag, this fixes https proxying
authorIgor Sysoev <igor@sysoev.ru>
Sun, 3 Jun 2007 19:58:30 +0000 (19:58 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Sun, 3 Jun 2007 19:58:30 +0000 (19:58 +0000)
src/core/ngx_output_chain.c

index 554fe1b150f84b64758d06a061dcb7c6c66ea353..6bb463a833c273622412ce968428975760559c97 100644 (file)
@@ -377,8 +377,9 @@ ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, ngx_uint_t sendfile)
             dst->in_file = 0;
         }
 
-        if (src->last_buf && src->pos == src->last) {
-            dst->last_buf = 1;
+        if (src->pos == src->last) {
+            dst->flush = src->flush;
+            dst->last_buf = src->last_buf;
         }
 
     } else {
@@ -417,8 +418,9 @@ ngx_output_chain_copy_buf(ngx_buf_t *dst, ngx_buf_t *src, ngx_uint_t sendfile)
 
         src->file_pos += n;
 
-        if (src->last_buf && src->file_pos == src->file_last) {
-            dst->last_buf = 1;
+        if (src->pos == src->last) {
+            dst->flush = src->flush;
+            dst->last_buf = src->last_buf;
         }
     }