<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process"
   href="https://bugs.webkit.org/show_bug.cgi?id=144738#c11">Comment # 11</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - REGRESSION(r183861): [SOUP] Downloads are broken when using the Network Process"
   href="https://bugs.webkit.org/show_bug.cgi?id=144738">bug 144738</a>
              from <span class="vcard"><a class="email" href="mailto:cgarcia&#64;igalia.com" title="Carlos Garcia Campos &lt;cgarcia&#64;igalia.com&gt;"> <span class="fn">Carlos Garcia Campos</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=144738#c9">comment #9</a>)
<span class="quote">&gt; &gt; What's wrong using a ResourceHandleClient for downloads?
&gt; 
&gt; It's best to use cross-platform code in the same way on all ports. When we
&gt; don't, we get bugs like this.</span >

But the downloads implementation in mac is not cross-platform at all, no?

<span class="quote">&gt; &gt; What we could do, though, is creating a new handle instead of reusing the existing one.
&gt; 
&gt; This seems better indeed, although it still smells like something that would
&gt; cause trouble due to different usage scenarios for the same cross-platform
&gt; abstraction.
&gt; 
&gt; &gt; Or we could add isDownload() to ResourceHandleClient and do something like:
&gt; 
&gt; This is a pretty gross hack. Even though downloading is the only case where
&gt; we swap ResourceHandleClients at this time, ResourceHandle interface in no
&gt; way enforces that. Also, the check would be super surprising to anyone who
&gt; looks at cross-platform and Mac code only - the libsoup behavior is hidden
&gt; pretty well.
&gt; 
&gt; If the first option (using custom soup based code for downloading) is not
&gt; practical, I would consider adding a disconnectClient(ResourceHandleClient*)
&gt; function to ResourceHandle, which would be a no-op if the argument doesn't
&gt; match the current client.
&gt; 
&gt; However, I have a suspicion that most of the code needed to reimplement
&gt; downloading would be moved, not duplicated.</span >

I could try to move the soup implementation to a helper class to be used by both ResourceHandle and Downloads, but that would require a lot more time. Since this is a serious regression, I prefer to fix it ASAP and then try to do it in a different way, but I still don't see why using a ResourceHandle is a problem. ResourceHandle is a good wrapper around the libsoup details, and I think we have always used a ResourceHandle for downloads, even in WebKit1.</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>