]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed old HTTP version comparison to treat {2,3,4...}.0 versions correctly.
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 24 Aug 2010 20:35:02 +0000 (14:35 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Tue, 24 Aug 2010 20:35:02 +0000 (14:35 -0600)
Uses the recently added HttpVersion comparison operators. No real-world
effect expected until we start seeing HTTP/2.0 messages.

src/HttpMsg.cc

index cb190001bededeca4c55aa164424e2c57df1485c..8ec450b5418c4b98a1ba10ced4d4ada367aa260e 100644 (file)
@@ -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.