Bug 172442 - [GTK] Blob download doesn't work
Summary: [GTK] Blob download doesn't work
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-22 04:50 PDT by ManDay
Modified: 2017-06-13 10:55 PDT (History)
7 users (show)

See Also:


Attachments
Patch (11.90 KB, patch)
2017-06-11 01:53 PDT, Carlos Garcia Campos
clopez: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ManDay 2017-05-22 04:50:52 PDT
For an example, try to "Export Route" (download button in the left-hand menu) from osm routing service:

https://www.openrouteservice.org/directions?a=50.774209,6.08443,50.395442,5.936762&b=0&c=0&k1=en-US&k2=km

MiniBrowser will report "Download failed: Load request cancelled"
Comment 1 Carlos Garcia Campos 2017-06-11 01:47:44 PDT
I've found the problem, and it's not a Soup issue (soup is not even used for Blobs), but GTK+ specific one. The problem is that GTK+ API uses URIs for download destination paths, and passes that uris to the WebKit internals. But WebKit expects download destination location to be a local path. This is not a problem for normal downloads, because the soup backend handles the cases of download destination being a URI and a path. For blob downloads NetworkDataTaskBlob is used, and it always expects the download destination to be a local path, failing in FileSystem::openFile() when a URI is passed. We need to keep using local files internally and convert to URIs only when exposing those paths to the API.
Comment 2 Carlos Garcia Campos 2017-06-11 01:53:17 PDT
Created attachment 312598 [details]
Patch
Comment 3 Build Bot 2017-06-11 01:54:36 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 4 ManDay 2017-06-13 10:38:07 PDT
Thank you Carlos, tested with Openrouteservice the Blob downloads now work in Minibrowser.
Comment 5 Carlos Garcia Campos 2017-06-13 10:41:32 PDT
But the patch hasn't landed, do not close bugs with unreviewed patches, please.
Comment 6 Carlos Garcia Campos 2017-06-13 10:55:36 PDT
Committed r218185: <http://trac.webkit.org/changeset/218185>