mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
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.
This commit is contained in:
parent
534a8a05f3
commit
e0bea7d541
7
CHANGES
7
CHANGES
@ -7,6 +7,13 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
|
||||||
|
Daniel (16 January 2005)
|
||||||
|
- 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.
|
||||||
|
|
||||||
Daniel (13 January 2005)
|
Daniel (13 January 2005)
|
||||||
- Inspired by Martijn Koster's patch and example source at
|
- Inspired by Martijn Koster's patch and example source at
|
||||||
http://www.greenhills.co.uk/mak/gentoo/curl-eintr-bug.c, I now made the
|
http://www.greenhills.co.uk/mak/gentoo/curl-eintr-bug.c, I now made the
|
||||||
|
12
lib/url.c
12
lib/url.c
@ -2356,21 +2356,19 @@ static CURLcode CreateConnection(struct SessionHandle *data,
|
|||||||
/* Note: if you add a new protocol, please update the list in
|
/* Note: if you add a new protocol, please update the list in
|
||||||
* lib/version.c too! */
|
* lib/version.c too! */
|
||||||
|
|
||||||
if(checkprefix("GOPHER", conn->host.name))
|
if(checkprefix("GOPHER.", conn->host.name))
|
||||||
strcpy(conn->protostr, "gopher");
|
strcpy(conn->protostr, "gopher");
|
||||||
#ifdef USE_SSLEAY
|
#ifdef USE_SSLEAY
|
||||||
else if(checkprefix("HTTPS", conn->host.name))
|
|
||||||
strcpy(conn->protostr, "https");
|
|
||||||
else if(checkprefix("FTPS", conn->host.name))
|
else if(checkprefix("FTPS", conn->host.name))
|
||||||
strcpy(conn->protostr, "ftps");
|
strcpy(conn->protostr, "ftps");
|
||||||
#endif /* USE_SSLEAY */
|
#endif /* USE_SSLEAY */
|
||||||
else if(checkprefix("FTP", conn->host.name))
|
else if(checkprefix("FTP.", conn->host.name))
|
||||||
strcpy(conn->protostr, "ftp");
|
strcpy(conn->protostr, "ftp");
|
||||||
else if(checkprefix("TELNET", conn->host.name))
|
else if(checkprefix("TELNET.", conn->host.name))
|
||||||
strcpy(conn->protostr, "telnet");
|
strcpy(conn->protostr, "telnet");
|
||||||
else if (checkprefix("DICT", conn->host.name))
|
else if (checkprefix("DICT.", conn->host.name))
|
||||||
strcpy(conn->protostr, "DICT");
|
strcpy(conn->protostr, "DICT");
|
||||||
else if (checkprefix("LDAP", conn->host.name))
|
else if (checkprefix("LDAP.", conn->host.name))
|
||||||
strcpy(conn->protostr, "LDAP");
|
strcpy(conn->protostr, "LDAP");
|
||||||
else {
|
else {
|
||||||
strcpy(conn->protostr, "http");
|
strcpy(conn->protostr, "http");
|
||||||
|
Loading…
Reference in New Issue
Block a user