RESOLVED FIXED 163107
NetworkSession: downloads started by startDownload() can fail before starting from the API point of view
https://bugs.webkit.org/show_bug.cgi?id=163107
Summary NetworkSession: downloads started by startDownload() can fail before starting...
Carlos Garcia Campos
Reported 2016-10-07 04:38:20 PDT
In the network process we use a PendingDownload in this case, but in the UI process we always have a single download proxy. If an error happens before the pending download is converted inot a real download, the DidFail messages is received in the download proxy before the DidStart one. This is problematic at least for the GTK+ API, because it's common to connect to the started signal and connect to all other signals from there, but in this case the started signal is never emitted, and then the failed one is not handled. This is not a problem for downloads started by convertTaskToDownload, because in that case those loads are not considered a download by the UI process when those early errors happen, and then the web page handles them.
Attachments
Patch (4.76 KB, patch)
2016-10-07 04:43 PDT, Carlos Garcia Campos
achristensen: review+
Carlos Garcia Campos
Comment 1 2016-10-07 04:43:16 PDT
Darin Adler
Comment 2 2016-10-07 12:16:19 PDT
Looks good to me, but I’m not enough of an expert on this area to do review+
Darin Adler
Comment 3 2016-10-07 12:16:38 PDT
Can we create a test case?
Alex Christensen
Comment 4 2016-10-07 13:19:37 PDT
Comment on attachment 290922 [details] Patch This is definitely correct. r=me We should add testing infrastructure for things like this, but right now all our download tests are API tests that don't use the network :(
Carlos Garcia Campos
Comment 5 2016-10-10 00:48:35 PDT
Note You need to log in before you can comment on or make changes to this bug.