Re: [Vimprobable-users] Improve handling of file parameters
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
From: Morgan H. <mt...@gm...> - 2013-02-25 10:42:27
|
On Mon, Feb 25, 2013 at 5:08 PM, Morgan Howe <mt...@gm...> wrote: > vp2 www.example.com > Check for file, if it exists, build the URI as in my patch, otherwise fall > back to URL. > > vp2 http://www.example.com > Properly formed URI, use it. > > Now the only other case would be a file named "http://www.example.com" > which on any of the systems I have available is not a legal filename > anyway. That would be the one case where the user would need to then > properly specify the file:// prefix, though like I said, I'm not sure this > scenario is even possible. Either way, at least with this behavior, there > is always a reasonable workaround. Better suggestions are welcome. :) > > Which, actually, should be the current behavior now that I review the code (my patch did not have enough context lines to show the full logic). The current steps are: 1) Check if it's a search engine 2) If not a search engine, look for "://", if found, trust the user. 3) Else, check if it's a file and if so, build the file:// URI 4) Else, check (again) if it's a search engine 5) Else, prefix with "http://" and attempt to open. Due to the order of the evaluation, the issue you mentioned originally should not be a problem. Regards, Morgan |