aboutsummaryrefslogtreecommitdiff
path: root/imap-send.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-28 09:01:13 -0700
committerJunio C Hamano <gitster@pobox.com>2016-10-28 09:01:13 -0700
commitf98180a982168d767529c36337b1aadfa0d07788 (patch)
tree550dbb0521b583fd401cb55a206de9f7d7623c98 /imap-send.c
parent9338904a5f91141ca2502abfbca87730a3aa48f0 (diff)
parentd2d07ab8613ef283ceda6fdaa05fa6976dc1206f (diff)
downloadgit-f98180a982168d767529c36337b1aadfa0d07788.tar.gz
git-f98180a982168d767529c36337b1aadfa0d07788.tar.xz
Merge branch 'ak/curl-imap-send-explicit-scheme' into maint
When we started cURL to talk to imap server when a new enough version of cURL library is available, we forgot to explicitly add imap(s):// before the destination. To some folks, that didn't work and the library tried to make HTTP(s) requests instead. * ak/curl-imap-send-explicit-scheme: imap-send: Tell cURL to use imap:// or imaps://
Diffstat (limited to 'imap-send.c')
-rw-r--r--imap-send.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c
index 0f5f4760e..adb9738c3 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1410,6 +1410,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
curl_easy_setopt(curl, CURLOPT_USERNAME, server.user);
curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);
+ strbuf_addstr(&path, server.use_ssl ? "imaps://" : "imap://");
strbuf_addstr(&path, server.host);
if (!path.len || path.buf[path.len - 1] != '/')
strbuf_addch(&path, '/');