From 2eda87d1a5c814047928d1bbd8ed5ed8d0a2529b Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Tue, 24 Aug 2010 14:35:02 -0600 Subject: [PATCH] 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. --- src/HttpMsg.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. -- 2.47.3