Open Merivuokko opened 2 years ago
It is too much work IMO. My proposition, is to make configurable default protocol. For example, if it is http, for text without protocol http:// will be prepended if file then file://, etc.
Added default protocol https:// . It does not work yet if you want other protocols.
Could the default protocol be a list? Each protocol in the list is tried in the specified order until one succeeds or there are no more protocols left.
-- Aura
What do you mean by "succeded" here? Could you provide an use case with list of protocols?
I think that you should be able to specify to have no default protocol, in which case the URL is treated as relative, e.g. entering greenpeace.org
when the current URL is http://localhost/
will go to http://localhost/greenpeace.org
. If the relative URL is not a valid URL (or if there is no current URL to be relative to), then it can display an error message and not attempt to rewrite it (the user can edit the URL to make it valid and then try again). If there is no such file (e.g. if the current URL is a file:
URL and the browser knows there is no such file), or if the domain name won't resolve, then it is same like as though you followed a link to a non-existent file; it would display an error message.
Elinks does not recognize newer Top Level Domains as such.
For example entering
greenpeace.org
into the goto url dialog redirects automatically tohttp://greenpeace.org
.But entering
haskellweekly.news
redirects to a file: URL, which in my case results in a "No such file or directory" error message.I propose that Elinks adds all current Internet TLDs to its TLD list.