]> git.kaiwu.me - nginx.git/commitdiff
Fixing proxy_set_body and proxy_pass_request_body with SSL.
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 18 Aug 2011 16:34:24 +0000 (16:34 +0000)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 18 Aug 2011 16:34:24 +0000 (16:34 +0000)
Flush flag wasn't set in constructed buffer and this prevented any data
from being actually sent to upstream due to SSL buffering.  Make sure
we always set flush in the last buffer we are going to sent.

See here for report:
http://nginx.org/pipermail/nginx-ru/2011-June/041552.html

src/http/modules/ngx_http_proxy_module.c

index 495b1743d8ba17085c6d208e4859737c6cb776d1..902cfb8f2916ac2171de41726bd3002dfb112711 100644 (file)
@@ -1132,12 +1132,11 @@ ngx_http_proxy_create_request(ngx_http_request_t *r)
             body = body->next;
         }
 
-        b->flush = 1;
-
     } else {
         u->request_bufs = cl;
     }
 
+    b->flush = 1;
     cl->next = NULL;
 
     return NGX_OK;