From: Fabian Keil <fk@fabiankeil.de>
Date: Fri, 21 Nov 2008 18:39:53 +0000 (+0000)
Subject: In case of CONNECT requests there's no point
X-Git-Tag: v_3_0_11~159
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/developer-manual/static/gitweb.js?a=commitdiff_plain;h=93dd282a854fb190737148aa25f3c34f46948da5;p=privoxy.git

In case of CONNECT requests there's no point
in trying to keep the connection alive.
---

diff --git a/parsers.c b/parsers.c
index 88530a85..7fbed895 100644
--- a/parsers.c
+++ b/parsers.c
@@ -1,4 +1,4 @@
-const char parsers_rcs[] = "$Id: parsers.c,v 1.147 2008/11/04 17:20:31 fabiankeil Exp $";
+const char parsers_rcs[] = "$Id: parsers.c,v 1.148 2008/11/16 12:43:49 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/parsers.c,v $
@@ -44,6 +44,11 @@ const char parsers_rcs[] = "$Id: parsers.c,v 1.147 2008/11/04 17:20:31 fabiankei
  *
  * Revisions   :
  *    $Log: parsers.c,v $
+ *    Revision 1.148  2008/11/16 12:43:49  fabiankeil
+ *    Turn keep-alive support into a runtime feature
+ *    that is disabled by setting keep-alive-timeout
+ *    to a negative value.
+ *
  *    Revision 1.147  2008/11/04 17:20:31  fabiankeil
  *    HTTP/1.1 responses without Connection
  *    header imply keep-alive. Act accordingly.
@@ -4691,7 +4696,8 @@ static const char *get_appropiate_connection_header(const struct client_state *c
    static const char connection_keep_alive[] = "Connection: keep-alive";
    static const char connection_close[] = "Connection: close";
 
-   if ((csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE))
+   if ((csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE)
+    && (csp->http->ssl == 0))
    {
       return connection_keep_alive;
    }