In finish_http_response(), set 'Connection: close' after preventing pipelining
authorFabian Keil <fk@fabiankeil.de>
Tue, 18 Sep 2012 18:29:55 +0000 (18:29 +0000)
committerFabian Keil <fk@fabiankeil.de>
Tue, 18 Sep 2012 18:29:55 +0000 (18:29 +0000)
I missed the CGI parts when committing parsers.c v1.250.

cgi.c

diff --git a/cgi.c b/cgi.c
index 46dae93..d39e4a0 100644 (file)
--- a/cgi.c
+++ b/cgi.c
@@ -1,4 +1,4 @@
-const char cgi_rcs[] = "$Id: cgi.c,v 1.153 2012/06/08 15:15:11 fabiankeil Exp $";
+const char cgi_rcs[] = "$Id: cgi.c,v 1.154 2012/07/23 12:42:53 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/cgi.c,v $
@@ -1714,7 +1714,8 @@ struct http_response *finish_http_response(const struct client_state *csp, struc
       if (!err) err = enlist_unique_header(rsp->headers, "Pragma", "no-cache");
    }
 
-   if (!err && !(csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE))
+   if (!err && (!(csp->flags & CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE)
+              || (csp->flags & CSP_FLAG_SERVER_SOCKET_TAINTED)))
    {
       err = enlist_unique_header(rsp->headers, "Connection", "close");
    }