From: Fabian Keil Date: Mon, 25 May 2009 15:41:52 +0000 (+0000) Subject: Keep the server header 'Connection: keep-alive' around if the client implied keep... X-Git-Tag: v_3_0_13~75 X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@/faq/%22https:/@default-cgi@show-url-info?a=commitdiff_plain;h=af1726ac139dcb270201a2f65dc68bb0063771aa;p=privoxy.git Keep the server header 'Connection: keep-alive' around if the client implied keep-alive my not setting any Connection header. --- diff --git a/parsers.c b/parsers.c index 1dd1a22d..e5898046 100644 --- a/parsers.c +++ b/parsers.c @@ -1,4 +1,4 @@ -const char parsers_rcs[] = "$Id: parsers.c,v 1.161 2009/05/19 18:02:03 fabiankeil Exp $"; +const char parsers_rcs[] = "$Id: parsers.c,v 1.162 2009/05/25 15:40:52 fabiankeil Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/parsers.c,v $ @@ -3432,6 +3432,12 @@ static jb_err client_connection_header_adder(struct client_state *csp) return JB_ERR_OK; } + if ((csp->config->feature_flags & RUNTIME_FEATURE_CONNECTION_KEEP_ALIVE) + && (csp->http->ssl == 0)) + { + csp->flags |= CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE; + } + log_error(LOG_LEVEL_HEADER, "Adding: %s", wanted_header); return enlist(csp->headers, wanted_header);