diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-01-16 08:51:52 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-01-16 08:51:52 +0000 |
commit | e0bea7d54152e0acd5b10c5ac616ccbad6168da7 (patch) | |
tree | d5efefcf1207dff89854fbbe3d6418aeda709968 /lib | |
parent | 534a8a05f3b781b1f4d8890a7b8415db4e159af1 (diff) |
Alex aka WindEagle pointed out that when doing "curl -v dictionary.com", curl
assumed this used the DICT protocol. While guessing protocols will remain
fuzzy, I've now made sure that the host names must start with "[protocol]."
for them to be a valid guessable name. I also removed "https" as a prefix that
indicates HTTPS, since we hardly ever see any host names using that.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/url.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -2356,21 +2356,19 @@ static CURLcode CreateConnection(struct SessionHandle *data, /* Note: if you add a new protocol, please update the list in * lib/version.c too! */ - if(checkprefix("GOPHER", conn->host.name)) + if(checkprefix("GOPHER.", conn->host.name)) strcpy(conn->protostr, "gopher"); #ifdef USE_SSLEAY - else if(checkprefix("HTTPS", conn->host.name)) - strcpy(conn->protostr, "https"); else if(checkprefix("FTPS", conn->host.name)) strcpy(conn->protostr, "ftps"); #endif /* USE_SSLEAY */ - else if(checkprefix("FTP", conn->host.name)) + else if(checkprefix("FTP.", conn->host.name)) strcpy(conn->protostr, "ftp"); - else if(checkprefix("TELNET", conn->host.name)) + else if(checkprefix("TELNET.", conn->host.name)) strcpy(conn->protostr, "telnet"); - else if (checkprefix("DICT", conn->host.name)) + else if (checkprefix("DICT.", conn->host.name)) strcpy(conn->protostr, "DICT"); - else if (checkprefix("LDAP", conn->host.name)) + else if (checkprefix("LDAP.", conn->host.name)) strcpy(conn->protostr, "LDAP"); else { strcpy(conn->protostr, "http"); |