From: hno <> Date: Sat, 24 Aug 2002 07:59:51 +0000 (+0000) Subject: Bugfix in client persistent connections: Don't assume that the fact that X-Git-Tag: SQUID_3_0_PRE1~826 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f6329bc335f50f5b6911cf4383371864e021ec02;p=thirdparty%2Fsquid.git Bugfix in client persistent connections: Don't assume that the fact that the client sent a HTTP/1.1 request as an indication that we can use a HTTP/1.0 style persistent connection. A HTTP/1.1 client does not need to understand or expect HTTP/1.0 style persistent connections. --- diff --git a/src/client_side.cc b/src/client_side.cc index c391e23855..c35e695d15 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.586 2002/08/22 20:26:38 wessels Exp $ + * $Id: client_side.cc,v 1.587 2002/08/24 01:59:51 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -1026,14 +1026,19 @@ clientSetKeepaliveFlag(clientHttpRequest * http) { request_t *request = http->request; const HttpHeader *req_hdr = &request->header; + debug(33, 3) ("clientSetKeepaliveFlag: http_ver = %d.%d\n", request->http_ver.major, request->http_ver.minor); debug(33, 3) ("clientSetKeepaliveFlag: method = %s\n", RequestMethodStr[request->method]); if (!Config.onoff.client_pconns) request->flags.proxy_keepalive = 0; - else if (httpMsgIsPersistent(request->http_ver, req_hdr)) - request->flags.proxy_keepalive = 1; + else { + http_version_t http_ver; + httpBuildVersion(&http_ver, 1, 0); /* we are HTTP/1.0, no matter what the client requests... */ + if (httpMsgIsPersistent(http_ver, req_hdr)) + request->flags.proxy_keepalive = 1; + } } static int