aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorCameron Kaiser <ckaiser@floodgap.com>2010-08-12 07:55:48 -0700
committerDaniel Stenberg <daniel@haxx.se>2010-08-25 14:19:58 +0200
commit201637d4682973bcc4a1fd0f4e8d4159300bd0b8 (patch)
tree0c6e010662a4cbed6080f0d10975e890c7f1d214 /lib/url.c
parent6b6a3bcb61f2d8f4e80a1e2a5bc62e78904256ed (diff)
Gopher protocol support (initial release)
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index 3ae797532..6b312eb11 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -138,6 +138,7 @@ void idn_free (void *ptr); /* prototype from idn-free.h, not provided by
#include "socks.h"
#include "rtsp.h"
#include "curl_rtmp.h"
+#include "gopher.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
@@ -227,6 +228,10 @@ static const struct Curl_handler * const protocols[] = {
&Curl_handler_rtsp,
#endif
+#ifndef CURL_DISABLE_GOPHER
+ &Curl_handler_gopher,
+#endif
+
#ifdef USE_LIBRTMP
&Curl_handler_rtmp,
&Curl_handler_rtmpt,
@@ -3482,8 +3487,11 @@ static CURLcode findprotocol(struct SessionHandle *data,
if(Curl_raw_equal(p->scheme, protostr)) {
/* Protocol found in table. Check if allowed */
if(!(data->set.allowed_protocols & p->protocol))
+{
/* nope, get out */
+ fprintf(stderr, "well, shit\n");
break;
+}
/* it is allowed for "normal" request, now do an extra check if this is
the result of a redirect */