diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2021-01-05 17:22:09 +0100 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-05 17:22:58 +0100 |
| commit | e8efef8a8177e22f6263e54fa564914fa4bb82a3 (patch) | |
| tree | 4be290c8a7033cbed570518a4de95f0d7267f9fa | |
| parent | 25c1d5e6a8ccaf9c56751e23e3c7f17c0dc0555e (diff) | |
| download | curl-e8efef8a8177e22f6263e54fa564914fa4bb82a3.tar.gz | |
curl.h: add CURLPROTO_GOPHERS as own protocol identifier
To make sure it can be handled separately from plain gopher.
| -rw-r--r-- | include/curl/curl.h | 1 | ||||
| -rw-r--r-- | lib/gopher.c | 4 | ||||
| -rw-r--r-- | src/tool_libinfo.c | 5 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index 6b5f97a5e..3c0461bc2 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1016,6 +1016,7 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy, #define CURLPROTO_SMB (1<<26) #define CURLPROTO_SMBS (1<<27) #define CURLPROTO_MQTT (1<<28) +#define CURLPROTO_GOPHERS (1<<29) #define CURLPROTO_ALL (~0) /* enable everything */ /* long may be 32 or 64 bits, but we should never depend on anything else diff --git a/lib/gopher.c b/lib/gopher.c index c02436d4a..0f6825ef2 100644 --- a/lib/gopher.c +++ b/lib/gopher.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -98,7 +98,7 @@ const struct Curl_handler Curl_handler_gophers = { ZERO_NULL, /* readwrite */ ZERO_NULL, /* connection_check */ PORT_GOPHER, /* defport */ - CURLPROTO_GOPHER, /* protocol */ + CURLPROTO_GOPHERS, /* protocol */ CURLPROTO_GOPHER, /* family */ PROTOPT_SSL /* flags */ }; diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c index 1b0f98e08..58088eab0 100644 --- a/src/tool_libinfo.c +++ b/src/tool_libinfo.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -55,15 +55,18 @@ CURLcode get_libcurl_info(void) { "ftp", CURLPROTO_FTP }, { "ftps", CURLPROTO_FTPS }, { "gopher", CURLPROTO_GOPHER }, + { "gophers",CURLPROTO_GOPHERS}, { "http", CURLPROTO_HTTP }, { "https", CURLPROTO_HTTPS }, { "imap", CURLPROTO_IMAP }, { "imaps", CURLPROTO_IMAPS }, { "ldap", CURLPROTO_LDAP }, { "ldaps", CURLPROTO_LDAPS }, + { "mqtt", CURLPROTO_MQTT }, { "pop3", CURLPROTO_POP3 }, { "pop3s", CURLPROTO_POP3S }, { "rtmp", CURLPROTO_RTMP }, + { "rtmps", CURLPROTO_RTMPS }, { "rtsp", CURLPROTO_RTSP }, { "scp", CURLPROTO_SCP }, { "sftp", CURLPROTO_SFTP }, |
