<html>
    <head>
      <base href="https://bugs.webkit.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebSockets: response Set-Cookie header not handled when using platform APIs"
   href="https://bugs.webkit.org/show_bug.cgi?id=200165#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - WebSockets: response Set-Cookie header not handled when using platform APIs"
   href="https://bugs.webkit.org/show_bug.cgi?id=200165">bug 200165</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=375338&action=diff" name="attach_375338" title="Patch">attachment 375338</a> <a href="attachment.cgi?id=375338&action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=375338&action=review">https://bugs.webkit.org/attachment.cgi?id=375338&action=review</a>

<span class="quote">>> Source/WebKit/NetworkProcess/NetworkSocketChannel.cpp:109
>> +        m_session->networkStorageSession()->setCookiesFromDOM(m_request.firstPartyForCookies(), SameSiteInfo::create(m_request),

> You should probably check m_session before using it, since it's weak.</span >

I'm doing it, see the condition above:

if (!serverSetCookie.isEmpty() && m_session) {

<span class="quote">>> Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm:87
>> +    // FIXME: support extensions and server cookie.

> Actually, you should probably make an accessor for m_session on NetworkSocketChannel then move your cookie setting code from NetworkSocketChannel::didConnect to WebSocketTaskSoup.cpp because the cocoa implementation won't be setting cookies like this.</span >

Ok, isn't it possible to use the same approach to set the cookies?</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>