Bug 163538

Summary: [SOUP] Downloads should always sniff contents
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bugs-noreply
Priority: P2 Keywords: Gtk, Soup
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mcatanzaro: review+

Carlos Garcia Campos
Reported 2016-10-17 03:30:06 PDT
It's quite common that downloads have weird filenames with no extension, so it would be better if the loader sniff the contents to guess the mime type.
Attachments
Patch (6.51 KB, patch)
2016-10-17 03:33 PDT, Carlos Garcia Campos
mcatanzaro: review+
Carlos Garcia Campos
Comment 1 2016-10-17 03:33:04 PDT
Michael Catanzaro
Comment 2 2016-10-17 03:49:48 PDT
Comment on attachment 291806 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=291806&action=review > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:640 > + g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, "application/pdf"); So what did you actually do? Does this function call fail without your change?
Carlos Garcia Campos
Comment 3 2016-10-17 03:53:06 PDT
(In reply to comment #2) > Comment on attachment 291806 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291806&action=review > > > Tools/TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:640 > > + g_assert_cmpstr(webkit_uri_response_get_mime_type(response), ==, "application/pdf"); > > So what did you actually do? Does this function call fail without your > change? The assert fails, because the returned mime type is not application/pdf
Carlos Garcia Campos
Comment 4 2016-10-17 03:54:53 PDT
Note You need to log in before you can comment on or make changes to this bug.