<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Content Extensions] Content blocking rules are not consulted for pings (<a ping>)"
href="https://bugs.webkit.org/show_bug.cgi?id=149873#c18">Comment # 18</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Content Extensions] Content blocking rules are not consulted for pings (<a ping>)"
href="https://bugs.webkit.org/show_bug.cgi?id=149873">bug 149873</a>
from <span class="vcard"><a class="email" href="mailto:roop+webkit@roopc.net" title="Roopesh Chander <roop+webkit@roopc.net>"> <span class="fn">Roopesh Chander</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=262988&action=diff" name="attach_262988" title="Patch (fails one test)">attachment 262988</a> <a href="attachment.cgi?id=262988&action=edit" title="Patch (fails one test)">[details]</a></span>
Patch (fails one test)
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=262988&action=review">https://bugs.webkit.org/attachment.cgi?id=262988&action=review</a>
<span class="quote">>>> Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:173
>>> + }
>>
>> There are lots of places you use {} around single lines, which WebKit style doesn't like. <a href="https://www.webkit.org/coding/coding-style.html">https://www.webkit.org/coding/coding-style.html</a> Use Tools/Scripts/check-webkit-style to check this.</span >
Sorry, I forgot to run check-webkit-style this time.
<span class="quote">>>> Source/WebCore/loader/PingLoader.cpp:96
>>> + request.setAllowCookies(false);
>>
>> Why not call processContentExtensionRulesForLoad with this request instead of making a new function processContentExtensionRulesForPing? I think that would be even cleaner.</span >
Our options are:
(a) Process content blocking rules on the ping URL before creating the request object.
Then, if a request should be sent, call request.setAllowCookies(false) if applicable.
(or)
(b) Create a request object always, then call processContentExtensionRulesForLoad(request).
If this results in BlockedStatus::Blocked, discard the request object.
Benjamin's earlier comment (<a class="bz_bug_link
bz_status_NEW "
title="NEW - [Content Extensions] Content blocking rules are not consulted for pings (<a ping>)"
href="show_bug.cgi?id=149873#c9">https://bugs.webkit.org/show_bug.cgi?id=149873#c9</a>) suggested that (a) is the preferred option, so that's what this patch implements. Implementing (b) would be a simpler patch because I wouldn't have to touch the ContentExtensionsBackend at all.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>