From 3dadd654cf675dfb04bc21b0db64f4cb46d1879c Mon Sep 17 00:00:00 2001 From: Xinchen Hui Date: Fri, 29 Jan 2016 20:38:50 -0800 Subject: [PATCH] Also WIN32 side --- main/fastcgi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main/fastcgi.c b/main/fastcgi.c index 3ab08b625f..ce33369045 100644 --- a/main/fastcgi.c +++ b/main/fastcgi.c @@ -1277,11 +1277,11 @@ void fcgi_close(fcgi_request *req, int force, int destroy) DisconnectNamedPipe(pipe); } else { if (!force) { - fcgi_header buf; + char buf[8]; shutdown(req->fd, 1); - /* read the last FCGI_STDIN header (it may be omitted) */ - recv(req->fd, (char *)(&buf), sizeof(buf), 0); + /* read any remaining data, it may be omitted */ + while (recv(req->fd, buf, sizeof(buf), 0) > 0) {} } closesocket(req->fd); } -- 2.40.0