From kde-commits Fri Mar 10 00:07:51 2006 From: Ivor Hewitt Date: Fri, 10 Mar 2006 00:07:51 +0000 To: kde-commits Subject: branches/KDE/3.5/kdelibs/kioslave/http Message-Id: <1141949271.159349.1041.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=114194938231294 SVN commit 517118 by ivor: Allow connection keep-alive if the server asks for it even if not http1.1 M +7 -9 http.cc --- branches/KDE/3.5/kdelibs/kioslave/http/http.cc #517117:517118 @@ -3335,12 +3335,9 @@ if (!compact.isEmpty()) setMetaData("PrivacyCompactPolicy", compact.join("\n")); } - - // continue only if we know that we're HTTP/1.1 - else if (httpRev == HTTP_11) { - // let them tell us if we should stay alive or not - if (strncasecmp(buf, "Connection:", 11) == 0) - { + // let them tell us if we should stay alive or not + else if (strncasecmp(buf, "Connection:", 11) == 0) + { if (strncasecmp(trimLead(buf + 11), "Close", 5) == 0) m_bKeepAlive = false; else if (strncasecmp(trimLead(buf + 11), "Keep-Alive", 10)==0) @@ -3357,10 +3354,11 @@ canUpgrade = true; } } - - } + } + // continue only if we know that we're HTTP/1.1 + else if ( httpRev == HTTP_11) { // what kind of encoding do we have? transfer? - else if (strncasecmp(buf, "Transfer-Encoding:", 18) == 0) { + if (strncasecmp(buf, "Transfer-Encoding:", 18) == 0) { // If multiple encodings have been applied to an entity, the // transfer-codings MUST be listed in the order in which they // were applied.