[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kioslave/http
From:       Ivor Hewitt <ivor () ivor ! org>
Date:       2006-03-10 0:07:51
Message-ID: 1141949271.159349.1041.nullmailer () svn ! kde ! org
[Download RAW message or body]

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.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic