<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [SOUP] Fix handling of accept language property"
href="https://bugs.webkit.org/show_bug.cgi?id=166969#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [SOUP] Fix handling of accept language property"
href="https://bugs.webkit.org/show_bug.cgi?id=166969">bug 166969</a>
from <span class="vcard"><a class="email" href="mailto:mcatanzaro@igalia.com" title="Michael Catanzaro <mcatanzaro@igalia.com>"> <span class="fn">Michael Catanzaro</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=298672&action=diff" name="attach_298672" title="Patch">attachment 298672</a> <a href="attachment.cgi?id=298672&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=298672&action=review">https://bugs.webkit.org/attachment.cgi?id=298672&action=review</a>
I noticed this back before we supported network session. (That said, is it actually possible to have multiple network sessions in our port yet, or is that a future step?)
<span class="quote">> Source/WebKit2/NetworkProcess/soup/NetworkProcessSoup.cpp:101
> + g_object_set(NetworkStorageSession::defaultStorageSession().soupNetworkSession().soupSession(), "accept-language", acceptLanguages.data(), nullptr);
> + NetworkStorageSession::forEach([acceptLanguages](const WebCore::NetworkStorageSession& session) {
> + g_object_set(session.soupNetworkSession().soupSession(), "accept-language", acceptLanguages.data(), nullptr);</span >
Hmmmm
I think our SoupNetworkSession class should have a helper function that wraps this g_object_set(..., "accept-language", ...) so that you don't have to do this manually from outside the class. Up until this patch, that was SoupNetworkSession::setAcceptLanguages. So I really don't see the advantage to this approach. Instead of changing setAcceptLanguages to be static, I would call it here, and add a new static function SoupNetworkSession::setInitialAcceptLanguages to set it for new SoupNetworkSession objects. (I guess it's not possible to pass in via the constructor for some reason?)
This is just a matter of style; I'm willing to give r+ if you disagree, but I don't think this is the nicest way.</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>