Changeset 126346 in webkit


Ignore:
Timestamp:
Aug 22, 2012 1:57:06 PM (12 years ago)
Author:
psolanki@apple.com
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.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r126345 r126346  
     12012-08-22  Pratik Solanki  <psolanki@apple.com>
     2
     3        Setting WebKitEnableHTTPPipelining doesn't work if default is true
     4        https://bugs.webkit.org/show_bug.cgi?id=94537
     5
     6        Reviewed by David Kilzer.
     7
     8        * platform/network/cf/ResourceRequestCFNet.cpp:
     9        (WebCore::initializeMaximumHTTPConnectionCountPerHost): Read in the HTTP pipelining pref and
     10        allow it to override the default pipelining behavior if it was actually set.
     11
    1122012-08-22  W. James MacLean  <wjmaclean@chromium.org>
    213
  • trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp

    r123675 r126346  
    266266}
    267267
    268 #if USE(CFNETWORK) || PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
    269 static inline bool readBooleanPreference(CFStringRef key)
    270 {
    271     Boolean keyExistsAndHasValidFormat;
    272     Boolean result = CFPreferencesGetAppBooleanValue(key, kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
    273     return keyExistsAndHasValidFormat ? result : false;
    274 }
    275 #endif
    276 
    277268unsigned initializeMaximumHTTPConnectionCountPerHost()
    278269{
     
    285276    static const unsigned unlimitedConnectionCount = 10000;
    286277
    287     if (!ResourceRequest::httpPipeliningEnabled() && readBooleanPreference(CFSTR("WebKitEnableHTTPPipelining")))
    288         ResourceRequest::setHTTPPipeliningEnabled(true);
     278    Boolean keyExistsAndHasValidFormat = false;
     279    Boolean prefValue = CFPreferencesGetAppBooleanValue(CFSTR("WebKitEnableHTTPPipelining"), kCFPreferencesCurrentApplication, &keyExistsAndHasValidFormat);
     280    if (keyExistsAndHasValidFormat)
     281        ResourceRequest::setHTTPPipeliningEnabled(prefValue);
    289282
    290283    if (ResourceRequest::httpPipeliningEnabled()) {
Note: See TracChangeset for help on using the changeset viewer.