From 710f14edba4491a4ac9222a7e3103b51fd30dbe0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 20 Apr 2014 19:37:54 +0200 Subject: handler: make 'protocol' always specified as a single bit This makes the findprotocol() function work as intended so that libcurl can properly be restricted to not support HTTP while still supporting HTTPS - since the HTTPS handler previously set both the HTTP and HTTPS bits in the protocol field. This fixes --proto and --proto-redir for most SSL protocols. This is done by adding a few new convenience defines that groups HTTP and HTTPS, FTP and FTPS etc that should then be used when the code wants to check for both protocols at once. PROTO_FAMILY_[protocol] style. Bug: https://github.com/bagder/curl/pull/97 Reported-by: drizzt --- lib/imap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/imap.c') diff --git a/lib/imap.c b/lib/imap.c index 9808f998a..fc162b6c8 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -155,7 +155,7 @@ const struct Curl_handler Curl_handler_imaps = { imap_disconnect, /* disconnect */ ZERO_NULL, /* readwrite */ PORT_IMAPS, /* defport */ - CURLPROTO_IMAP | CURLPROTO_IMAPS, /* protocol */ + CURLPROTO_IMAPS, /* protocol */ PROTOPT_CLOSEACTION | PROTOPT_SSL | PROTOPT_NEEDSPWD /* flags */ }; -- cgit v1.2.3