<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@igalia.com" title="Carlos Garcia Campos <cgarcia@igalia.com>"> <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">> > What's wrong using a ResourceHandleClient for downloads?
>
> It's best to use cross-platform code in the same way on all ports. When we
> don't, we get bugs like this.</span >
But the downloads implementation in mac is not cross-platform at all, no?
<span class="quote">> > What we could do, though, is creating a new handle instead of reusing the existing one.
>
> This seems better indeed, although it still smells like something that would
> cause trouble due to different usage scenarios for the same cross-platform
> abstraction.
>
> > Or we could add isDownload() to ResourceHandleClient and do something like:
>
> This is a pretty gross hack. Even though downloading is the only case where
> we swap ResourceHandleClients at this time, ResourceHandle interface in no
> way enforces that. Also, the check would be super surprising to anyone who
> looks at cross-platform and Mac code only - the libsoup behavior is hidden
> pretty well.
>
> If the first option (using custom soup based code for downloading) is not
> practical, I would consider adding a disconnectClient(ResourceHandleClient*)
> function to ResourceHandle, which would be a no-op if the argument doesn't
> match the current client.
>
> However, I have a suspicion that most of the code needed to reimplement
> 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>