Title: [126346] trunk/Source/WebCore
Revision
126346
Author
[email protected]
Date
2012-08-22 13:57:06 -0700 (Wed, 22 Aug 2012)

Log Message

Setting WebKitEnableHTTPPipelining doesn't work if default is true
https://bugs.webkit.org/show_bug.cgi?id=94537

Reviewed by David Kilzer.

* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::initializeMaximumHTTPConnectionCountPerHost): Read in the HTTP pipelining pref and
allow it to override the default pipelining behavior if it was actually set.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126345 => 126346)


--- trunk/Source/WebCore/ChangeLog	2012-08-22 20:47:56 UTC (rev 126345)
+++ trunk/Source/WebCore/ChangeLog	2012-08-22 20:57:06 UTC (rev 126346)
@@ -1,3 +1,14 @@
+2012-08-22  Pratik Solanki  <[email protected]>
+
+        Setting WebKitEnableHTTPPipelining doesn't work if default is true
+        https://bugs.webkit.org/show_bug.cgi?id=94537
+
+        Reviewed by David Kilzer.
+
+        * platform/network/cf/ResourceRequestCFNet.cpp:
+        (WebCore::initializeMaximumHTTPConnectionCountPerHost): Read in the HTTP pipelining pref and
+        allow it to override the default pipelining behavior if it was actually set.
+
 2012-08-22  W. James MacLean  <[email protected]>
 
         [chromium] Add touch link highlight animation layers.

Modified: trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp (126345 => 126346)


--- trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp	2012-08-22 20:47:56 UTC (rev 126345)
+++ trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp	2012-08-22 20:57:06 UTC (rev 126346)
@@ -265,15 +265,6 @@
     s_httpPipeliningEnabled = flag;
 }
 
-#if USE(CFNETWORK) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
-static inline bool readBooleanPreference(CFStringRef key)
-{
-    Boolean keyExistsAndHasValidFormat;
-    Boolean result = CFPreferencesGetAppBooleanValue(key, kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
-    return keyExistsAndHasValidFormat ? result : false;
-}
-#endif
-
 unsigned initializeMaximumHTTPConnectionCountPerHost()
 {
     static const unsigned preferredConnectionCount = 6;
@@ -284,8 +275,10 @@
 #if USE(CFNETWORK) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
     static const unsigned unlimitedConnectionCount = 10000;
 
-    if (!ResourceRequest::httpPipeliningEnabled() && readBooleanPreference(CFSTR("WebKitEnableHTTPPipelining")))
-        ResourceRequest::setHTTPPipeliningEnabled(true);
+    Boolean keyExistsAndHasValidFormat = false;
+    Boolean prefValue = CFPreferencesGetAppBooleanValue(CFSTR("WebKitEnableHTTPPipelining"), kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
+    if (keyExistsAndHasValidFormat)
+        ResourceRequest::setHTTPPipeliningEnabled(prefValue);
 
     if (ResourceRequest::httpPipeliningEnabled()) {
         wkSetHTTPPipeliningMaximumPriority(toHTTPPipeliningPriority(ResourceLoadPriorityHighest));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to