From: wessels <> Date: Mon, 6 Apr 1998 02:32:44 +0000 (+0000) Subject: fix Proxy-connection: Keep-Alive check X-Git-Tag: SQUID_3_0_PRE1~3623 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a90ba3db6774691fd8a6b9a6ecd64d0d678d20cb;p=thirdparty%2Fsquid.git fix Proxy-connection: Keep-Alive check rename pconn_keep_alive to proxy_keep_alive --- diff --git a/src/HttpHeader.cc b/src/HttpHeader.cc index 5295e85662..e1576878ea 100644 --- a/src/HttpHeader.cc +++ b/src/HttpHeader.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.29 1998/04/03 22:26:32 rousskov Exp $ + * $Id: HttpHeader.cc,v 1.30 1998/04/05 20:32:44 wessels Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -130,7 +130,7 @@ static http_hdr_type ListHeadersArr[] = HDR_ACCEPT_CHARSET, HDR_ACCEPT_ENCODING, HDR_ACCEPT_LANGUAGE, HDR_ACCEPT_RANGES, /* HDR_ALLOW, */ - HDR_CACHE_CONTROL, HDR_CONNECTION, + HDR_CACHE_CONTROL, HDR_CONTENT_ENCODING, /* HDR_CONTENT_LANGUAGE, */ /* HDR_IF_MATCH, HDR_IF_NONE_MATCH, HDR_PRAGMA, */ diff --git a/src/HttpReply.cc b/src/HttpReply.cc index a10bd7ee05..b6bc07b6ba 100644 --- a/src/HttpReply.cc +++ b/src/HttpReply.cc @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.cc,v 1.13 1998/03/20 18:06:39 rousskov Exp $ + * $Id: HttpReply.cc,v 1.14 1998/04/05 20:32:44 wessels Exp $ * * DEBUG: section 58 HTTP Reply (Response) * AUTHOR: Alex Rousskov @@ -270,7 +270,9 @@ httpReplyHdrCacheInit(HttpReply * rep) rep->cache_control = httpHeaderGetCc(hdr); rep->content_range = httpHeaderGetContRange(hdr); str = httpHeaderGetStr(hdr, HDR_PROXY_CONNECTION); - rep->pconn_keep_alive = str && strcasecmp(str, "Keep-Alive"); + if (NULL == str) + str = httpHeaderGetStr(hdr, HDR_CONNECTION); /* @?@ FIX ME */ + rep->proxy_keep_alive = str && 0 == strcasecmp(str, "Keep-Alive"); /* final adjustments */ /* The max-age directive takes priority over Expires, check it first */ if (rep->cache_control && rep->cache_control->max_age >= 0) diff --git a/src/http.cc b/src/http.cc index 51a11b774c..d0460a91b1 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.262 1998/04/01 21:23:01 wessels Exp $ + * $Id: http.cc,v 1.263 1998/04/05 20:32:45 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -366,7 +366,7 @@ httpProcessReplyHeader(HttpStateData * httpState, const char *buf, int size) if (EBIT_TEST(httpState->flags, HTTP_KEEPALIVE)) if (httpState->peer) httpState->peer->stats.n_keepalives_sent++; - if (reply->pconn_keep_alive) + if (reply->proxy_keep_alive) if (httpState->peer) httpState->peer->stats.n_keepalives_recv++; ctx_exit(ctx); diff --git a/src/structs.h b/src/structs.h index 74b1669d08..28e0eb43f3 100644 --- a/src/structs.h +++ b/src/structs.h @@ -567,7 +567,7 @@ struct _HttpReply { String content_type; HttpHdrCc *cache_control; HttpHdrContRange *content_range; - short int pconn_keep_alive; + short int proxy_keep_alive; /* public, readable */ HttpMsgParseState pstate; /* the current parsing state */