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.
This commit is contained in:
Daniel Stenberg 2006-01-16 22:14:37 +00:00
parent 1e8d094274
commit 67a83c1b34
21 changed files with 27 additions and 91 deletions

View File

@ -7,6 +7,10 @@
Changelog
Daniel (16 January 2006)
- 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.
- Bryan Henderson turned the 'initialized' variable for curl_global_init()
into a counter, and thus you can now do multiple curl_global_init() and you
are then supposed to do the same amount of calls to curl_global_cleanup().

View File

@ -11,6 +11,7 @@ Curl and libcurl 7.15.2
This release includes the following changes:
o Gopher is now officially abandoned as a protocol (lib)curl tries to support.
o curl_global_init() and curl_global_cleanup() are now using a refcount so
that it is now legal to call them multiple times. See updated info for
details.
@ -39,6 +40,7 @@ This release would not have looked like this without help, code, reports and
advice from friends like these:
Dov Murik, Jean Jacques Drouin, Andres Garcia, Yang Tse, Gisle Vanem, Dan
Fandrich, Alexander Lazic, Michael Jahn, Andrew Benham, Bryan Henderson
Fandrich, Alexander Lazic, Michael Jahn, Andrew Benham, Bryan Henderson,
David Shaw
Thanks! (and sorry if I forgot to mention someone)

View File

@ -185,10 +185,8 @@ AC_HELP_STRING([--disable-http],[Disable HTTP support]),
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
AC_MSG_WARN([disable HTTP disables FTP over proxy and GOPHER too])
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER])
AC_MSG_WARN([disable HTTP disables FTP over proxy])
AC_SUBST(CURL_DISABLE_HTTP, [1])
AC_SUBST(CURL_DISABLE_GOPHER, [1])
;;
*) AC_MSG_RESULT(yes)
;;
@ -210,21 +208,6 @@ AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support gopher])
AC_ARG_ENABLE(gopher,
AC_HELP_STRING([--enable-gopher],[Enable GOPHER support])
AC_HELP_STRING([--disable-gopher],[Disable GOPHER support]),
[ case "$enableval" in
no)
AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER])
AC_SUBST(CURL_DISABLE_GOPHER, [1])
;;
*) AC_MSG_RESULT(yes)
;;
esac ],
AC_MSG_RESULT(yes)
)
AC_MSG_CHECKING([whether to support file])
AC_ARG_ENABLE(file,
AC_HELP_STRING([--enable-file],[Enable FILE support])

View File

@ -101,9 +101,6 @@ while test $# -gt 0; do
echo "FTPS"
fi
fi
if test "@CURL_DISABLE_GOPHER@" != "1"; then
echo "GOPHER"
fi
if test "@CURL_DISABLE_FILE@" != "1"; then
echo "FILE"
fi

View File

@ -114,7 +114,7 @@ FAQ
libcurl
A free and easy-to-use client-side URL transfer library, supporting FTP,
FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP. libcurl supports
FTPS, HTTP, HTTPS, TELNET, DICT, FILE and LDAP. libcurl supports
HTTPS certificates, HTTP POST, HTTP PUT, FTP uploading, kerberos, HTTP
form based upload, proxies, cookies, user+password authentication, file
transfer resume, http proxy tunneling and more!
@ -132,8 +132,7 @@ FAQ
A command line tool for getting or sending files using URL syntax.
Since curl uses libcurl, it supports a range of common Internet protocols,
currently including HTTP, HTTPS, FTP, FTPS, GOPHER, LDAP, DICT, TELNET and
FILE.
currently including HTTP, HTTPS, FTP, FTPS, LDAP, DICT, TELNET and FILE.
We pronounce curl and cURL with an initial k sound: [kurl].

View File

@ -109,10 +109,6 @@ LDAP (*2)
DICT
- extended DICT URL support
GOPHER
- GET
- via http-proxy
FILE
- URL support
- "uploads"

View File

@ -260,7 +260,6 @@ Win32
CURL_DISABLE_TELNET disables TELNET
CURL_DISABLE_DICT disables DICT
CURL_DISABLE_FILE disables FILE
CURL_DISABLE_GOPHER disables GOPHER
If you want to set any of these defines you have the following
possibilities:

View File

@ -23,10 +23,6 @@ SIMPLE USAGE
curl ftp://cool.haxx.se/
Get a gopher document from funet's gopher server:
curl gopher://gopher.funet.fi
Get the definition of curl from a dictionary:
curl dict://dict.org/m:curl
@ -94,10 +90,6 @@ USING PASSWORDS
Probably most commonly used with private certificates, as explained below.
GOPHER
Curl features no password support for gopher.
PROXY
Get an ftp file using a proxy named my-proxy that uses port 888:
@ -748,7 +740,7 @@ ENVIRONMENT VARIABLES
Curl reads and understands the following environment variables:
http_proxy, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY
http_proxy, HTTPS_PROXY, FTP_PROXY
They should be set for protocol-specific proxies. General proxy should be
set with

View File

@ -53,10 +53,10 @@ in $prefix/lib and its header files are installed in $prefix/include and so
on. The prefix is set with "configure --prefix".
.IP "--protocols"
Lists what particular protocols the installed libcurl was built to support. At
the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, GOPHER,
FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols
will be listed using uppercase and are separated by newlines. There may be
none, one or several protocols in the list. (Added in 7.13.0)
the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
TELNET, LDAP, DICT. Do not assume any particular order. The protocols will
be listed using uppercase and are separated by newlines. There may be none,
one or several protocols in the list. (Added in 7.13.0)
.IP "--version"
Outputs version information about the installed libcurl.
.IP "--vernum"

View File

@ -30,8 +30,8 @@ curl \- transfer a URL
.SH DESCRIPTION
.B curl
is a tool to transfer data from or to a server, using one of the supported
protocols (HTTP, HTTPS, FTP, FTPS, TFTP, GOPHER, DICT, TELNET, LDAP or
FILE). The command is designed to work without user interaction.
protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE).
The command is designed to work without user interaction.
curl offers a busload of useful tricks like proxy support, user
authentication, ftp upload, HTTP post, SSL (https:) connections, cookies, file
@ -1198,8 +1198,6 @@ Sets proxy server to use for HTTP.
Sets proxy server to use for HTTPS.
.IP "FTP_PROXY [protocol://]<host>[:port]"
Sets proxy server to use for FTP.
.IP "GOPHER_PROXY [protocol://]<host>[:port]"
Sets proxy server to use for GOPHER.
.IP "ALL_PROXY [protocol://]<host>[:port]"
Sets proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>"

View File

@ -46,7 +46,6 @@ AC_DEFUN([LIBCURL_CHECK_CONFIG],
AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS])
AH_TEMPLATE([LIBCURL_PROTOCOL_GOPHER],[Defined if libcurl supports GOPHER])
AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE])
AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
@ -188,7 +187,7 @@ x=CURLOPT_VERBOSE;
# We don't have --protocols, so just assume that all
# protocols are available
_libcurl_protocols="HTTP FTP GOPHER FILE TELNET LDAP DICT"
_libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
if test x$libcurl_feature_SSL = xyes ; then
_libcurl_protocols="$_libcurl_protocols HTTPS"

View File

@ -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

View File

@ -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 /<item-type>/ 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")) {

View File

@ -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 */

View File

@ -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

View File

@ -5,7 +5,7 @@
%define curlroot %{_builddir}/%{tarball}-%{version}
Summary: get a file from a FTP, GOPHER or HTTP server.
Summary: get a file from an FTP or HTTP server.
Name: %{name}
Version: %{version}
Release: %{release}

View File

@ -5,7 +5,7 @@
%define builddir $RPM_BUILD_DIR/%{name}-%{version}
Summary: get a file from a FTP, GOPHER or HTTP server.
Summary: get a file from an FTP or HTTP server.
Name: %{name}
Version: %{version}
Release: %{release}

View File

@ -1,5 +1,5 @@
Curl is a tool for transferring files with URL syntax, supporting
FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE and LDAP.
FTP, FTPS, HTTP, HTTPS, TELNET, DICT, FILE and LDAP.
Curl supports HTTPS certificates, HTTP POST, HTTP PUT,
FTP uploading, kerberos, HTTP form based upload, proxies,
cookies, user+password authentication, file transfer resume,
@ -91,7 +91,7 @@ Packaging Instructions:
@ curl
sdesc: "a client that groks URLs"
ldesc: "Curl is a tool for transferring files with URL syntax,
supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FILE
supporting FTP, FTPS, HTTP, HTTPS, TELNET, DICT, FILE
and LDAP. Curl supports HTTPS certificates, HTTP POST, HTTP PUT,
FTP uploading, kerberos, HTTP form based upload, proxies,
cookies, user+password authentication, file transfer resume,

View File

@ -269,7 +269,7 @@ for(@links) {
if($url =~ /^([^:]+):/) {
$prot = $1;
# if($prot !~ /(http|ftp|gopher)/i) {
# if($prot !~ /(http|ftp)/i) {
if($prot !~ /http/i) {
# this is an unsupported protocol, we ignore this
next linkloop;

View File

@ -85,4 +85,4 @@ TEST CASE NUMBERS
TODO:
* Add tests for TELNET, GOPHER, LDAP, DICT...
* Add tests for TELNET, LDAP, DICT...

View File

@ -204,7 +204,7 @@ $SIG{KILL} = \&catch_zap;
# to prevent them to interfere with our testing!
my $protocol;
foreach $protocol (('ftp', 'http', 'ftps', 'https', 'gopher', 'no')) {
foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no')) {
my $proxy = "${protocol}_proxy";
# clear lowercase version
$ENV{$proxy}=undef;