From: Alex Rousskov Date: Tue, 24 Aug 2010 20:35:02 +0000 (-0600) Subject: Fixed old HTTP version comparison to treat {2,3,4...}.0 versions correctly. X-Git-Tag: take1~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2eda87d1a5c814047928d1bbd8ed5ed8d0a2529b;p=thirdparty%2Fsquid.git Fixed old HTTP version comparison to treat {2,3,4...}.0 versions correctly. Uses the recently added HttpVersion comparison operators. No real-world effect expected until we start seeing HTTP/2.0 messages. --- diff --git a/src/HttpMsg.cc b/src/HttpMsg.cc index cb190001be..8ec450b541 100644 --- a/src/HttpMsg.cc +++ b/src/HttpMsg.cc @@ -319,7 +319,7 @@ HttpMsg::setContentLength(int64_t clen) bool HttpMsg::persistent() const { - if ((http_ver.major >= 1) && (http_ver.minor >= 1)) { + if (http_ver > HttpVersion(1, 0)) { /* * for modern versions of HTTP: persistent unless there is * a "Connection: close" header.