diff --git a/src/protocol/protocol.c b/src/protocol/protocol.c index a319aa1b6..95fafcd7b 100644 --- a/src/protocol/protocol.c +++ b/src/protocol/protocol.c @@ -280,6 +280,10 @@ static union option_info protocol_options[] = { "protocol", OPT_SORT, N_("Protocol specific options.")), + INIT_OPT_STRING("protocol", N_("Default protocol prefix"), + "default_protocol", OPT_ZERO, "https://", + N_("Default protocol prefix when none protocol was entered.")), + INIT_OPT_STRING("protocol", N_("No-proxy domains"), "no_proxy", OPT_ZERO, "", N_("Comma separated list of domains for which the proxy " diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 573c63ffb..9d8435039 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -1276,11 +1276,9 @@ parse_uri: break; case PROTOCOL_UNKNOWN: - /* We default to file:// even though we already - * tested if the file existed since it will give - * a "No such file or directory" error. which - * might better hint the user that there was - * problem figuring out the URI. */ + add_to_string(&str, get_opt_str("protocol.default_protocol", NULL)); + add_to_string(&str, newurl); + break; case PROTOCOL_FILE: default: add_to_string(&str, "file://");