From 67a83c1b3465c44b249eaa44fdc492952e59b31f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 16 Jan 2006 22:14:37 +0000 Subject: David Shaw finally removed all traces of Gopher and we are now officially not supporting it. It hasn't been functioning for years anyway, so this is just finally stating what already was true. And a cleanup at the same time. --- lib/setup.h | 5 ----- lib/url.c | 26 ++------------------------ lib/urldata.h | 3 --- lib/version.c | 3 --- 4 files changed, 2 insertions(+), 35 deletions(-) (limited to 'lib') diff --git a/lib/setup.h b/lib/setup.h index 26494dcc7..ea8b4691c 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -30,7 +30,6 @@ #define CURL_DISABLE_TELNET #define CURL_DISABLE_DICT #define CURL_DISABLE_FILE -#define CURL_DISABLE_GOPHER #endif /* HTTP_ONLY */ #if !defined(WIN32) && defined(__WIN32__) @@ -357,10 +356,6 @@ typedef int curl_socket_t; #endif #endif -#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_GOPHER) -#define CURL_DISABLE_GOPHER -#endif - #ifdef CURLDEBUG #define DEBUGF(x) x #else diff --git a/lib/url.c b/lib/url.c index e012e01af..b8927fbcd 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2485,14 +2485,12 @@ 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)) - strcpy(conn->protostr, "gopher"); + if(checkprefix("FTP.", conn->host.name)) + strcpy(conn->protostr, "ftp"); #ifdef USE_SSL else if(checkprefix("FTPS", conn->host.name)) strcpy(conn->protostr, "ftps"); #endif /* USE_SSL */ - else if(checkprefix("FTP.", conn->host.name)) - strcpy(conn->protostr, "ftp"); else if(checkprefix("TELNET.", conn->host.name)) strcpy(conn->protostr, "telnet"); else if (checkprefix("DICT.", conn->host.name)) @@ -2596,7 +2594,6 @@ static CURLcode CreateConnection(struct SessionHandle *data, * http_proxy=http://some.server.dom:port/ * https_proxy=http://some.server.dom:port/ * ftp_proxy=http://some.server.dom:port/ - * gopher_proxy=http://some.server.dom:port/ * no_proxy=domain1.dom,host.domain2.dom * (a comma-separated list of hosts which should * not be proxied, or an asterisk to override @@ -2778,25 +2775,6 @@ static CURLcode CreateConnection(struct SessionHandle *data, " was built with SSL disabled, https: not supported!"); return CURLE_UNSUPPORTED_PROTOCOL; #endif /* !USE_SSL */ - } - else if (strequal(conn->protostr, "GOPHER")) { -#ifndef CURL_DISABLE_GOPHER - conn->port = PORT_GOPHER; - conn->remote_port = PORT_GOPHER; - /* Skip // in path if present */ - if (isdigit((int)conn->path[1])) { - conn->path = strchr(&conn->path[1], '/'); - if (conn->path == NULL) - conn->path = conn->pathbuffer; - } - conn->protocol |= PROT_GOPHER; - conn->curl_do = Curl_http; - conn->curl_do_more = NULL; - conn->curl_done = Curl_http_done; -#else - failf(data, LIBCURL_NAME - " was built with GOPHER disabled, gopher: not supported!"); -#endif } else if(strequal(conn->protostr, "FTP") || strequal(conn->protostr, "FTPS")) { diff --git a/lib/urldata.h b/lib/urldata.h index 0293dd5ad..94889234a 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -30,7 +30,6 @@ #define PORT_FTP 21 #define PORT_FTPS 990 #define PORT_TELNET 23 -#define PORT_GOPHER 70 #define PORT_HTTP 80 #define PORT_HTTPS 443 #define PORT_DICT 2628 @@ -541,7 +540,6 @@ struct connectdata { long protocol; /* PROT_* flags concerning the protocol set */ #define PROT_MISSING (1<<0) -#define PROT_GOPHER (1<<1) #define PROT_HTTP (1<<2) #define PROT_HTTPS (1<<3) #define PROT_FTP (1<<4) @@ -703,7 +701,6 @@ struct connectdata { /* previously this was in the urldata struct */ union { struct HTTP *http; - struct HTTP *gopher; /* alias, just for the sake of being more readable */ struct HTTP *https; /* alias, just for the sake of being more readable */ struct FTP *ftp; void *tftp; /* private for tftp.c-eyes only */ diff --git a/lib/version.c b/lib/version.c index 42bdfd99c..53e2b56ef 100644 --- a/lib/version.c +++ b/lib/version.c @@ -87,9 +87,6 @@ static const char * const protocols[] = { #ifndef CURL_DISABLE_FTP "ftp", #endif -#ifndef CURL_DISABLE_GOPHER - "gopher", -#endif #ifndef CURL_DISABLE_TELNET "telnet", #endif -- cgit v1.2.3