Bug 32247

Summary: [GTK] Doesn't respect Content-Disposition for downloads, and provides no way for apps to do that
Product: WebKit Reporter: Gustavo Noronha (kov) <gns>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit.review.bot, xan.lopez
Priority: P2 Keywords: Gtk
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
proposed fix xan.lopez: review+, gns: commit-queue-

Description Gustavo Noronha (kov) 2009-12-07 14:39:53 PST
Currently, when a server sends a response with Content-Disposition, we are not respecting it, and we give no means for the application to decided, during the mime type policy check, if it wants to perform a download based on that header. This is a rather severe problem for some users, because it makes us unable to work correctly when the 'Download' link in attachments webkit is able to render itself is clicked in GMail, for instance.
Comment 1 Gustavo Noronha (kov) 2009-12-07 14:45:23 PST
Created attachment 44433 [details]
proposed fix
Comment 2 Gustavo Noronha (kov) 2009-12-07 14:45:41 PST
Xan? Jan? =)
Comment 3 WebKit Review Bot 2009-12-07 14:48:57 PST
Attachment 44433 [details] did not pass style-queue:

Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1
WebKit/gtk/tests/testwebframe.c:158:  test_webkit_web_frame_response is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/tests/testwebframe.c:160:  Declaration has space between * and variable name in WebKitWebFrame* frame  [whitespace/declaration] [3]
WebKit/gtk/tests/testwebframe.c:161:  Declaration has space between * and variable name in WebKitNetworkResponse* response  [whitespace/declaration] [3]
WebKit/gtk/webkit/webkitwebframe.cpp:1158:  webkit_web_frame_get_network_response is incorrectly named. Don't use underscores in your identifier names.  [readability/naming] [4]
WebKit/gtk/webkit/webkitwebframe.cpp:1162:  Use 0 instead of NULL.  [readability/null] [5]
WebKit/gtk/webkit/webkitwebframe.cpp:1166:  Use 0 instead of NULL.  [readability/null] [5]
WebKit/gtk/webkit/webkitwebframe.h:176:  Extra space before ( in function call  [whitespace/parens] [4]
WebKit/gtk/tests/testmimehandling.c:109:  Declaration has space between * and variable name in WebKitNetworkResponse* response  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:110:  Declaration has space between * and variable name in SoupMessage* message  [whitespace/declaration] [3]
WebKit/gtk/tests/testmimehandling.c:111:  Declaration has space between * and variable name in char* disposition  [whitespace/declaration] [3]
Total errors found: 10
Comment 4 Xan Lopez 2009-12-07 15:09:47 PST
Comment on attachment 44433 [details]
proposed fix

Nice!
Comment 5 Gustavo Noronha (kov) 2009-12-07 18:46:36 PST
Landed as r51825.