After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721781 - Prefer the content type returned by the server
Prefer the content type returned by the server
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Downloads
git master
Other Linux
: Normal normal
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-08 11:51 UTC by Carlos Garcia Campos
Modified: 2014-01-08 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (3.47 KB, patch)
2014-01-08 11:52 UTC, Carlos Garcia Campos
committed Details | Review

Description Carlos Garcia Campos 2014-01-08 11:51:58 UTC
Instead of using the destination file. g_file_query_info() does synchronous I/O, so use it only as fallback when the server response doesn't include a content type header
Comment 1 Carlos Garcia Campos 2014-01-08 11:52:45 UTC
Created attachment 265690 [details] [review]
Patch
Comment 2 Claudio Saavedra 2014-01-08 11:54:49 UTC
Review of attachment 265690 [details] [review]:

Looks good, but shouldn't we fix the synchronicity in the fallback case anyway (by making this method asynchronous)?
Comment 3 Carlos Garcia Campos 2014-01-08 11:57:20 UTC
That would be the ideal solution, but all of its callers expect it to return the value synchronously. Fortunately, the content type is included in the response http headers in most of the cases, and webkit includes it even for local files.