From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 27 Jun 2009 11:25:33 +0000 (+0000)
Subject: Don't set CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE in case of HTTP/1.0 requests.
X-Git-Tag: v_3_0_14~75
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/@default-cgi@edit-actions-remove-url?a=commitdiff_plain;h=c1027b05f2bf16ec3d409c6a535c9c8c11e0f0ff;p=privoxy.git

Don't set CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE in case of HTTP/1.0 requests.

Otherwise the client might hang after receiving
all the data until the connection times out.
---

diff --git a/parsers.c b/parsers.c
index 2e12501f..f3d82745 100644
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.183 2009/06/17 18:23:06 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.184 2009/06/18 17:10:16 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -3474,7 +3474,8 @@ static jb_err client_connection_header_adder(struct client_state *csp)
 
 #ifdef FEATURE_CONNECTION_KEEP_ALIVE
    if ((csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE)
-      && (csp->http->ssl == 0))
+      && (csp->http->ssl == 0)
+      && !strcmpic(csp->http->ver, "HTTP/1.1"))
    {
       csp->flags |= CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE;
    }