diff options
-rw-r--r-- | main/fastcgi.c | 6 |
1 files 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); } |