aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorBen Burwell <ben@benburwell.com>2020-05-21 15:00:11 -0400
committerBen Burwell <ben@benburwell.com>2020-06-16 20:30:15 -0400
commitd8c87b67316fa87fdb9bd5c8b6b1d3291d9ebc9f (patch)
tree11fa34fa971880d47df6e8bfbf98bb3796ff0025 /lib/url.c
parent477a4e31d724a9e14f92092c3d2ec8e486b99403 (diff)
Add gemini protocol supportHEADmaster
The gemini protocol's "speculative specification" is documented at the following URLs: https://gemini.circumlunar.space/docs/spec-spec.txt gopher://gemini.circumlunar.space/1/docs/spec-spec.txt gemini://gemini.circumlunar.space/docs/spec-spec.txt This patch introduces preliminary support for version 0.11.0 of the specification, as of March 1st 2020.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 4021c5d78..cc5c282ad 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -113,6 +113,7 @@ bool curl_win32_idn_to_ascii(const char *in, char **out);
#include "inet_ntop.h"
#include "http_ntlm.h"
#include "curl_rtmp.h"
+#include "gemini.h"
#include "gopher.h"
#include "mqtt.h"
#include "http_proxy.h"
@@ -145,7 +146,7 @@ static unsigned int get_protocol_family(unsigned int protocol);
* Protocol table. Schemes (roughly) in 2019 popularity order:
*
* HTTPS, HTTP, FTP, FTPS, SFTP, FILE, SCP, SMTP, LDAP, IMAPS, TELNET, IMAP,
- * LDAPS, SMTPS, TFTP, SMB, POP3, GOPHER POP3S, RTSP, RTMP, SMBS, DICT
+ * LDAPS, SMTPS, TFTP, SMB, POP3, GOPHER POP3S, RTSP, RTMP, SMBS, DICT, GEMINI
*/
static const struct Curl_handler * const protocols[] = {
@@ -249,6 +250,10 @@ static const struct Curl_handler * const protocols[] = {
&Curl_handler_dict,
#endif
+#ifndef CURL_DISABLE_GEMINI
+ &Curl_handler_gemini,
+#endif
+
(struct Curl_handler *) NULL
};
@@ -4107,6 +4112,10 @@ static unsigned int get_protocol_family(unsigned int protocol)
family = CURLPROTO_GOPHER;
break;
+ case CURLPROTO_GEMINI:
+ family = CURLPROTO_GEMINI;
+ break;
+
case CURLPROTO_SMB:
case CURLPROTO_SMBS:
family = CURLPROTO_SMB;