If we decided not to keep the connection to the server alive, don't reuse a remembere...
[privoxy.git] / jcc.c
diff --git a/jcc.c b/jcc.c
index 867a5c9..58fe9a0 100644 (file)
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.258 2009/06/27 11:22:52 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.260 2009/07/05 12:00:09 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -1141,8 +1141,8 @@ static void mark_server_socket_tainted(struct client_state *csp)
 {
    if ((csp->flags & CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE))
    {
-      log_error(LOG_LEVEL_CONNECT, "Unsetting keep-alive flag.");
-      csp->flags &= ~CSP_FLAG_SERVER_CONNECTION_KEEP_ALIVE;
+      log_error(LOG_LEVEL_CONNECT,
+         "Marking the connection to the server tainted.");
       csp->flags |= CSP_FLAG_SERVER_SOCKET_TAINTED;
    }
 }
@@ -1632,6 +1632,7 @@ static void chat(struct client_state *csp)
 
 #ifdef FEATURE_CONNECTION_KEEP_ALIVE
    if ((csp->sfd != JB_INVALID_SOCKET)
+      && !(csp->flags & CSP_FLAG_SERVER_SOCKET_TAINTED)
       && socket_is_still_usable(csp->sfd)
       && connection_destination_matches(&csp->server_connection, http, fwd))
    {