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

List:       kde-commits
Subject:    =?utf-8?q?=5Bkdelibs=5D_kioslave/http=3A_Honor_the_user=27s_pref?=
From:       Dawit Alemayehu <adawit () kde ! org>
Date:       2011-03-06 0:44:47
Message-ID: 20110306004447.C4D5FA60B0 () git ! kde ! org
[Download RAW message or body]

Git commit c5c46f15ab1d5b10d620881fd45100d78a06d8cb by Dawit Alemayehu.
Committed on 06/03/2011 at 01:44.
Pushed by adawit into branch 'master'.

Honor the user's preference for persistent proxy connections by not overwriting
the value of m_request.isKeepAlive once it has been set.

M  +7    -5    kioslave/http/http.cpp     

http://commits.kde.org/kdelibs/c5c46f15ab1d5b10d620881fd45100d78a06d8cb

diff --git a/kioslave/http/http.cpp b/kioslave/http/http.cpp
index 4ad6aaa..0579382 100644
--- a/kioslave/http/http.cpp
+++ b/kioslave/http/http.cpp
@@ -460,7 +460,13 @@ void HTTPProtocol::resetSessionSettings()
   if (isHttpProxy(m_request.proxyUrl) && !isAutoSsl()) {
       m_request.isKeepAlive = config()->readEntry("PersistentProxyConnection", false);
       kDebug(7113) << "Enable Persistent Proxy Connection:" << m_request.isKeepAlive;
+  } else {
+      // Follow HTTP/1.1 spec and enable keep-alive by default
+      // unless the remote side tells us otherwise or we determine
+      // the persistent link has been terminated by the remote end.
+      m_request.isKeepAlive = true;
   }
+  m_request.keepAliveTimeout = 0;
 
   m_request.redirectUrl = KUrl();
   m_request.useCookieJar = config()->readEntry("Cookies", false);
@@ -554,11 +560,7 @@ void HTTPProtocol::resetSessionSettings()
   // Bounce back the actual referrer sent
   setMetaData(QLatin1String("referrer"), m_request.referrer);
 
-  // Follow HTTP/1.1 spec and enable keep-alive by default
-  // unless the remote side tells us otherwise or we determine
-  // the persistent link has been terminated by the remote end.
-  m_request.isKeepAlive = true;
-  m_request.keepAliveTimeout = 0;
+  // Reset the post data size
   m_iPostDataSize = NO_SIZE;
 }
 

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

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