From 201637d4682973bcc4a1fd0f4e8d4159300bd0b8 Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Thu, 12 Aug 2010 07:55:48 -0700 Subject: Gopher protocol support (initial release) --- lib/url.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/url.c') 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 @@ -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 */ -- cgit v1.2.3