[Webkit-unassigned] [Bug 64870] [chromium] FileAPI doesn't work properly with filenames containing '#'
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Aug 2 05:49:15 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=64870
--- Comment #11 from Sergey Ryazanov <serya at chromium.org> 2011-08-02 05:49:15 PST ---
WebKit's KURL::setPath is supposed to work properly with any argument including having '#' and '?' symbols (AsyncFileSystemChromium::virtualPathToFileSystemURL relies on it). Google's url_util::ReplaceComponents apparently is't. Consequently adaptor's code (that's the KURLGoogle.ccp, KURL::setPath or KURLGooglePrivate::replaceComponents) looks to be the right place to handle the difference.
As Darin said the scheme is filesystem:[securuty-origin]/[path]. [path] is not as restricted as in the BLOB scheme.
Instead of forcing googleurl to escaping all input of url_util::ReplaceComponents I would suggest to use encodeWithURLEscapeSequences/decodeURLEscapeSequences in each KURL getter and setter of KURLGoogle.cpp whose KURL.cpp counterpart does.
(In reply to comment #9)
> setPath is definitely the wrong place for this. What happens when somebody constructs a full URL without going through setPath? You'll get different canonicalization behavior.
>
> I presume your file refs are going through the "path URL" case of googleurl because you're using some random scheme? In this case, how much modification of these URLs do you need?
>
> In the case of blob URLs, we decided not to add support to googleurl for them. In this way, they're like data URLs. Data URLs have a specific format & requirements, but it's not googleurl's (or KURL's) job to interpret it, it's the code that's generating or interpreting the data URL's job to make sure it's well-formed & escaped properly.
>
> If your file stuff is similar, then your component should be generating properly escaped paths and we shouldn't need this. On the other hand, if we're going to be doing a lot of stuff, like doing relative URL resolution and fragment navigation on these URLs, it would be better to teach googleurl about them so the normal loader behavior works as expected.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list