WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94537
Setting WebKitEnableHTTPPipelining doesn't work if default is true
https://bugs.webkit.org/show_bug.cgi?id=94537
Summary
Setting WebKitEnableHTTPPipelining doesn't work if default is true
Pratik Solanki
Reported
2012-08-20 15:32:09 PDT
The code does if (!ResourceRequest::httpPipeliningEnabled() && readBooleanPreference(CFSTR("WebKitEnableHTTPPipelining"))) ResourceRequest::setHTTPPipeliningEnabled(true); if ResourceRequest::httpPipeliningEnabled() is set to true by default, then we never read the pref and never enable/disable pipelining per the pref.
Attachments
Patch
(2.78 KB, patch)
2012-08-20 15:37 PDT
,
Pratik Solanki
no flags
Details
Formatted Diff
Diff
Patch
(2.75 KB, patch)
2012-08-20 15:47 PDT
,
Pratik Solanki
ddkilzer
: review+
ddkilzer
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pratik Solanki
Comment 1
2012-08-20 15:32:37 PDT
<
rdar://problem/11831396
>
Pratik Solanki
Comment 2
2012-08-20 15:37:24 PDT
Created
attachment 159542
[details]
Patch
Pratik Solanki
Comment 3
2012-08-20 15:47:54 PDT
Created
attachment 159546
[details]
Patch
Alexey Proskuryakov
Comment 4
2012-08-21 12:01:31 PDT
> if ResourceRequest::httpPipeliningEnabled() is set to true by default, then we never read the pref and never enable/disable pipelining per the pref.
Did you mean "if...set to false"? This code looks like it's intentional, i.e. one should both set the preference, and call an API method to enable pipelining. Do you think that we now want to change that, or that the code was never actually meant to do that?
Pratik Solanki
Comment 5
2012-08-21 14:18:47 PDT
(In reply to
comment #4
)
> > if ResourceRequest::httpPipeliningEnabled() is set to true by default, then we never read the pref and never enable/disable pipelining per the pref. > > Did you mean "if...set to false"? > > This code looks like it's intentional, i.e. one should both set the preference, and call an API method to enable pipelining. Do you think that we now want to change that, or that the code was never actually meant to do that?
The code, as written, would only check the pref value if ResourceRequest::s_httpPipeliningEnabled was initialized to false. If it was initialized to true (e.g. to enable pipelining by default), then we couldn't use the pref to disable pipelining. The patch ensures that the pref, if present, overrides the default value in the file. Looking at the code some more, I guess if the pref is not present, there isn't a need to call setHTTPPipeliningEnabled(). It will just use the default in that case.
Alexey Proskuryakov
Comment 6
2012-08-21 14:35:49 PDT
Ah sorry, I didn't notice the lonely "!" sign in the expression.
David Kilzer (:ddkilzer)
Comment 7
2012-08-22 12:06:16 PDT
Comment on
attachment 159546
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=159546&action=review
r=me with comments addressed.
> Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp:278 > + Boolean keyExistsAndHasValidFormat;
Nit: Initialize to False.
> Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp:281 > + bool pipeliningEnabled = keyExistsAndHasValidFormat ? prefValue : ResourceRequest::httpPipeliningEnabled(); > + ResourceRequest::setHTTPPipeliningEnabled(pipeliningEnabled);
This could be simplified to this (as mentioned in
Comment #6
): if (keyExistsAndHasValidFormat) ResourceRequest::setHTTPPipeliningEnabled(prefValue);
David Kilzer (:ddkilzer)
Comment 8
2012-08-22 12:06:55 PDT
(In reply to
comment #7
)
> This could be simplified to this (as mentioned in
Comment #6
):
Err...
Comment #5
.
Pratik Solanki
Comment 9
2012-08-22 13:56:51 PDT
Committed
r126346
: <
http://trac.webkit.org/changeset/126346
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug