[nginx] Correctly flush request body to uwsgi with SSL.

Maxim Dounin mdounin at mdounin.ru
Tue Jun 16 18:26:51 UTC 2020


details:   https://hg.nginx.org/nginx/rev/8cf31489b479
branches:  
changeset: 7666:8cf31489b479
user:      Quantum <quantum2048 at gmail.com>
date:      Mon Jun 15 17:35:26 2020 -0400
description:
Correctly flush request body to uwsgi with SSL.

The flush flag was not set when forwarding the request body to the uwsgi
server. When using uwsgi_pass suwsgi://..., this causes the uwsgi server
to wait indefinitely for the request body and eventually time out due to
SSL buffering.

This is essentially the same change as 4009:3183165283cc, which was made
to ngx_http_proxy_module.c.

This will fix the uwsgi bug https://github.com/unbit/uwsgi/issues/1490.

diffstat:

 src/http/modules/ngx_http_uwsgi_module.c |  1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diffs (11 lines):

diff -r d127837c714f -r 8cf31489b479 src/http/modules/ngx_http_uwsgi_module.c
--- a/src/http/modules/ngx_http_uwsgi_module.c	Mon Jun 08 11:40:34 2020 +0300
+++ b/src/http/modules/ngx_http_uwsgi_module.c	Mon Jun 15 17:35:26 2020 -0400
@@ -1141,6 +1141,7 @@ ngx_http_uwsgi_create_request(ngx_http_r
         r->upstream->request_bufs = cl;
     }
 
+    b->flush = 1;
     cl->next = NULL;
 
     return NGX_OK;


More information about the nginx-devel mailing list