1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 07:38:49 -05:00

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 Changelog
Daniel (16 January 2006) 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() - 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 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(). 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: 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 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 that it is now legal to call them multiple times. See updated info for
details. details.
@ -39,6 +40,7 @@ This release would not have looked like this without help, code, reports and
advice from friends like these: advice from friends like these:
Dov Murik, Jean Jacques Drouin, Andres Garcia, Yang Tse, Gisle Vanem, Dan 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) Thanks! (and sorry if I forgot to mention someone)

View File

@ -185,10 +185,8 @@ AC_HELP_STRING([--disable-http],[Disable HTTP support]),
no) no)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
AC_MSG_WARN([disable HTTP disables FTP over proxy and GOPHER too]) AC_MSG_WARN([disable HTTP disables FTP over proxy])
AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER])
AC_SUBST(CURL_DISABLE_HTTP, [1]) AC_SUBST(CURL_DISABLE_HTTP, [1])
AC_SUBST(CURL_DISABLE_GOPHER, [1])
;; ;;
*) AC_MSG_RESULT(yes) *) AC_MSG_RESULT(yes)
;; ;;
@ -210,21 +208,6 @@ AC_HELP_STRING([--disable-ftp],[Disable FTP support]),
esac ], esac ],
AC_MSG_RESULT(yes) 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_MSG_CHECKING([whether to support file])
AC_ARG_ENABLE(file, AC_ARG_ENABLE(file,
AC_HELP_STRING([--enable-file],[Enable FILE support]) AC_HELP_STRING([--enable-file],[Enable FILE support])

View File

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

View File

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

View File

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

View File

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

View File

@ -23,10 +23,6 @@ SIMPLE USAGE
curl ftp://cool.haxx.se/ 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: Get the definition of curl from a dictionary:
curl dict://dict.org/m:curl curl dict://dict.org/m:curl
@ -94,10 +90,6 @@ USING PASSWORDS
Probably most commonly used with private certificates, as explained below. Probably most commonly used with private certificates, as explained below.
GOPHER
Curl features no password support for gopher.
PROXY PROXY
Get an ftp file using a proxy named my-proxy that uses port 888: 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: 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 They should be set for protocol-specific proxies. General proxy should be
set with 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". on. The prefix is set with "configure --prefix".
.IP "--protocols" .IP "--protocols"
Lists what particular protocols the installed libcurl was built to support. At 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, the time of writing, this list may include HTTP, HTTPS, FTP, FTPS, FILE,
FILE, TELNET, LDAP, DICT. Do not assume any particular order. The protocols TELNET, LDAP, DICT. Do not assume any particular order. The protocols will
will be listed using uppercase and are separated by newlines. There may be be listed using uppercase and are separated by newlines. There may be none,
none, one or several protocols in the list. (Added in 7.13.0) one or several protocols in the list. (Added in 7.13.0)
.IP "--version" .IP "--version"
Outputs version information about the installed libcurl. Outputs version information about the installed libcurl.
.IP "--vernum" .IP "--vernum"

View File

@ -30,8 +30,8 @@ curl \- transfer a URL
.SH DESCRIPTION .SH DESCRIPTION
.B curl .B curl
is a tool to transfer data from or to a server, using one of the supported 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 protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE).
FILE). The command is designed to work without user interaction. The command is designed to work without user interaction.
curl offers a busload of useful tricks like proxy support, user curl offers a busload of useful tricks like proxy support, user
authentication, ftp upload, HTTP post, SSL (https:) connections, cookies, file 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. Sets proxy server to use for HTTPS.
.IP "FTP_PROXY [protocol://]<host>[:port]" .IP "FTP_PROXY [protocol://]<host>[:port]"
Sets proxy server to use for FTP. 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]" .IP "ALL_PROXY [protocol://]<host>[:port]"
Sets proxy server to use if no protocol-specific proxy is set. Sets proxy server to use if no protocol-specific proxy is set.
.IP "NO_PROXY <comma-separated list of hosts>" .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_HTTPS],[Defined if libcurl supports HTTPS])
AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP]) AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS]) 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_FILE],[Defined if libcurl supports FILE])
AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET]) AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP]) 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 # We don't have --protocols, so just assume that all
# protocols are available # 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 if test x$libcurl_feature_SSL = xyes ; then
_libcurl_protocols="$_libcurl_protocols HTTPS" _libcurl_protocols="$_libcurl_protocols HTTPS"

View File

@ -30,7 +30,6 @@
#define CURL_DISABLE_TELNET #define CURL_DISABLE_TELNET
#define CURL_DISABLE_DICT #define CURL_DISABLE_DICT
#define CURL_DISABLE_FILE #define CURL_DISABLE_FILE
#define CURL_DISABLE_GOPHER
#endif /* HTTP_ONLY */ #endif /* HTTP_ONLY */
#if !defined(WIN32) && defined(__WIN32__) #if !defined(WIN32) && defined(__WIN32__)
@ -357,10 +356,6 @@ typedef int curl_socket_t;
#endif #endif
#endif #endif
#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_GOPHER)
#define CURL_DISABLE_GOPHER
#endif
#ifdef CURLDEBUG #ifdef CURLDEBUG
#define DEBUGF(x) x #define DEBUGF(x) x
#else #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 /* 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("FTP.", conn->host.name))
strcpy(conn->protostr, "gopher"); strcpy(conn->protostr, "ftp");
#ifdef USE_SSL #ifdef USE_SSL
else if(checkprefix("FTPS", conn->host.name)) else if(checkprefix("FTPS", conn->host.name))
strcpy(conn->protostr, "ftps"); strcpy(conn->protostr, "ftps");
#endif /* USE_SSL */ #endif /* USE_SSL */
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"); strcpy(conn->protostr, "telnet");
else if (checkprefix("DICT.", conn->host.name)) else if (checkprefix("DICT.", conn->host.name))
@ -2596,7 +2594,6 @@ static CURLcode CreateConnection(struct SessionHandle *data,
* http_proxy=http://some.server.dom:port/ * http_proxy=http://some.server.dom:port/
* https_proxy=http://some.server.dom:port/ * https_proxy=http://some.server.dom:port/
* ftp_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 * no_proxy=domain1.dom,host.domain2.dom
* (a comma-separated list of hosts which should * (a comma-separated list of hosts which should
* not be proxied, or an asterisk to override * 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!"); " was built with SSL disabled, https: not supported!");
return CURLE_UNSUPPORTED_PROTOCOL; return CURLE_UNSUPPORTED_PROTOCOL;
#endif /* !USE_SSL */ #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") || else if(strequal(conn->protostr, "FTP") ||
strequal(conn->protostr, "FTPS")) { strequal(conn->protostr, "FTPS")) {

View File

@ -30,7 +30,6 @@
#define PORT_FTP 21 #define PORT_FTP 21
#define PORT_FTPS 990 #define PORT_FTPS 990
#define PORT_TELNET 23 #define PORT_TELNET 23
#define PORT_GOPHER 70
#define PORT_HTTP 80 #define PORT_HTTP 80
#define PORT_HTTPS 443 #define PORT_HTTPS 443
#define PORT_DICT 2628 #define PORT_DICT 2628
@ -541,7 +540,6 @@ struct connectdata {
long protocol; /* PROT_* flags concerning the protocol set */ long protocol; /* PROT_* flags concerning the protocol set */
#define PROT_MISSING (1<<0) #define PROT_MISSING (1<<0)
#define PROT_GOPHER (1<<1)
#define PROT_HTTP (1<<2) #define PROT_HTTP (1<<2)
#define PROT_HTTPS (1<<3) #define PROT_HTTPS (1<<3)
#define PROT_FTP (1<<4) #define PROT_FTP (1<<4)
@ -703,7 +701,6 @@ struct connectdata {
/* previously this was in the urldata struct */ /* previously this was in the urldata struct */
union { union {
struct HTTP *http; 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 HTTP *https; /* alias, just for the sake of being more readable */
struct FTP *ftp; struct FTP *ftp;
void *tftp; /* private for tftp.c-eyes only */ void *tftp; /* private for tftp.c-eyes only */

View File

@ -87,9 +87,6 @@ static const char * const protocols[] = {
#ifndef CURL_DISABLE_FTP #ifndef CURL_DISABLE_FTP
"ftp", "ftp",
#endif #endif
#ifndef CURL_DISABLE_GOPHER
"gopher",
#endif
#ifndef CURL_DISABLE_TELNET #ifndef CURL_DISABLE_TELNET
"telnet", "telnet",
#endif #endif

View File

@ -5,7 +5,7 @@
%define curlroot %{_builddir}/%{tarball}-%{version} %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} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}

View File

@ -5,7 +5,7 @@
%define builddir $RPM_BUILD_DIR/%{name}-%{version} %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} Name: %{name}
Version: %{version} Version: %{version}
Release: %{release} Release: %{release}

View File

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

View File

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

View File

@ -85,4 +85,4 @@ TEST CASE NUMBERS
TODO: 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! # to prevent them to interfere with our testing!
my $protocol; my $protocol;
foreach $protocol (('ftp', 'http', 'ftps', 'https', 'gopher', 'no')) { foreach $protocol (('ftp', 'http', 'ftps', 'https', 'no')) {
my $proxy = "${protocol}_proxy"; my $proxy = "${protocol}_proxy";
# clear lowercase version # clear lowercase version
$ENV{$proxy}=undef; $ENV{$proxy}=undef;