Don't set CSP_FLAG_CLIENT_CONNECTION_KEEP_ALIVE in case of HTTP/1.0 requests.
authorFabian Keil <fk@fabiankeil.de>
Sat, 27 Jun 2009 11:25:33 +0000 (11:25 +0000)
committerFabian Keil <fk@fabiankeil.de>
Sat, 27 Jun 2009 11:25:33 +0000 (11:25 +0000)
Otherwise the client might hang after receiving
all the data until the connection times out.

parsers.c

index 2e12501..f3d8274 100644 (file)
--- 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;
    }