]> git.kaiwu.me - nginx.git/commitdiff
Correctly flush request body to uwsgi with SSL.
authorQuantum <quantum2048@gmail.com>
Mon, 15 Jun 2020 21:35:26 +0000 (17:35 -0400)
committerQuantum <quantum2048@gmail.com>
Mon, 15 Jun 2020 21:35:26 +0000 (17:35 -0400)
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.

src/http/modules/ngx_http_uwsgi_module.c

index 56dc236ef181ba7b95275ba4a9c345736679fbe4..bfc8b1d7878bb395e8c74ae383b93c85d689b1ae 100644 (file)
@@ -1141,6 +1141,7 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
         r->upstream->request_bufs = cl;
     }
 
+    b->flush = 1;
     cl->next = NULL;
 
     return NGX_OK;