Bug 25808

Summary: Create file uri from filename properly
Product: WebKit Reporter: Fridrich Strba <fridrich.strba>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: jmalonzo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
use a proper conversion from filename to uri
gustavo: review-
changed the condition as for review
none
A clean standard-complying patch with changelog
none
This patch even has the proper e-mail address and spaces instead of tabs
none
Adding the WebKit/gtk/tests/testdownload.c file to the patch jmalonzo: review+

Fridrich Strba
Reported 2009-05-14 14:43:43 PDT
A simple concatenating of file:// with the filename string is not valid file -> uri conversion. Use g_filename_to_uri instead because it does the right thing even on windows.
Attachments
use a proper conversion from filename to uri (1.32 KB, patch)
2009-05-14 14:44 PDT, Fridrich Strba
gustavo: review-
changed the condition as for review (1.33 KB, patch)
2009-05-14 15:09 PDT, Fridrich Strba
no flags
A clean standard-complying patch with changelog (2.61 KB, patch)
2009-05-15 00:17 PDT, Fridrich Strba
no flags
This patch even has the proper e-mail address and spaces instead of tabs (2.62 KB, patch)
2009-05-15 01:44 PDT, Fridrich Strba
no flags
Adding the WebKit/gtk/tests/testdownload.c file to the patch (3.49 KB, patch)
2009-05-15 09:48 PDT, Fridrich Strba
jmalonzo: review+
Fridrich Strba
Comment 1 2009-05-14 14:44:24 PDT
Created attachment 30358 [details] use a proper conversion from filename to uri
Gustavo Noronha (kov)
Comment 2 2009-05-14 14:50:16 PDT
Comment on attachment 30358 [details] use a proper conversion from filename to uri > +#ifndef _WIN32 > // we avoid the escaping for local files, because > // g_filename_from_uri (used internally by GFile) has problems > // decoding strings with arbitrary percent signs > if (url.isLocalFile()) > d->m_gfile = g_file_new_for_path(url.prettyURL().utf8().data() + sizeof("file://") - 1); > else > +#endif I think you want to use #if !PLATFORM(WIN_OS) here? Looks fine otherwise. Also, add a ChangeLog entry, please.
Fridrich Strba
Comment 3 2009-05-14 15:09:33 PDT
Created attachment 30361 [details] changed the condition as for review Will add changelog soon
Fridrich Strba
Comment 4 2009-05-15 00:17:42 PDT
Created attachment 30367 [details] A clean standard-complying patch with changelog
Fridrich Strba
Comment 5 2009-05-15 01:44:47 PDT
Created attachment 30377 [details] This patch even has the proper e-mail address and spaces instead of tabs
Jan Alonzo
Comment 6 2009-05-15 08:29:09 PDT
(In reply to comment #5) > Created an attachment (id=30377) [review] > This patch even has the proper e-mail address and spaces instead of tabs > Hi Fridrich Looking good. Can you also include WebKit/gtk/tests/testdownload.c in this patch? Thanks.
Fridrich Strba
Comment 7 2009-05-15 09:48:04 PDT
Created attachment 30391 [details] Adding the WebKit/gtk/tests/testdownload.c file to the patch
Jan Alonzo
Comment 8 2009-05-15 16:47:57 PDT
Comment on attachment 30391 [details] Adding the WebKit/gtk/tests/testdownload.c file to the patch r=me
Jan Alonzo
Comment 9 2009-05-15 16:49:05 PDT
Comment on attachment 30377 [details] This patch even has the proper e-mail address and spaces instead of tabs Clearing review flags as this patch is obsolete.
Jan Alonzo
Comment 10 2009-05-15 16:50:48 PDT
(In reply to comment #8) > (From update of attachment 30391 [details] [review]) > r=me > Landed in r43791
Note You need to log in before you can comment on or make changes to this bug.