From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 24 Nov 2012 14:00:25 +0000 (+0000)
Subject: Allow serve() to keep client connections open if the response content length is zero
X-Git-Tag: v_3_0_20~165
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/@default-cgi@/faq/user-manual/@default-cgi@?a=commitdiff_plain;h=83bee64007dca7eb73ecc7402bf19e90f5dde5cf;p=privoxy.git

Allow serve() to keep client connections open if the response content length is zero
---

diff --git a/jcc.c b/jcc.c
index 24ddae71..f66dad5b 100644
--- a/jcc.c
+++ b/jcc.c
@@ -1,4 +1,4 @@
-const char jcc_rcs[] = "$Id: jcc.c,v 1.413 2012/11/09 10:48:17 fabiankeil Exp $";
+const char jcc_rcs[] = "$Id: jcc.c,v 1.414 2012/11/09 10:53:39 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jcc.c,v $
@@ -951,6 +951,7 @@ static int server_response_is_complete(struct client_state *csp,
        */
       csp->expected_content_length = 0;
       content_length_known = TRUE;
+      csp->flags |= CSP_FLAG_SERVER_CONTENT_LENGTH_SET;
    }
 
    if (csp->http->status == 204 || csp->http->status == 304)
@@ -960,6 +961,7 @@ static int server_response_is_complete(struct client_state *csp,
        */
       csp->expected_content_length = 0;
       content_length_known = TRUE;
+      csp->flags |= CSP_FLAG_SERVER_CONTENT_LENGTH_SET;
    }
 
    return (content_length_known && ((0 == csp->expected_content_length)