GNOME Bugzilla – Bug 721781
Prefer the content type returned by the server
Last modified: 2014-01-08 11:58:33 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
Created attachment 265690 [details] [review] Patch
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)?
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.