diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-10-10 14:03:47 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-10-10 14:03:48 -0700 |
commit | 6d6321af1d66346f462ad599249d5ae02faf922e (patch) | |
tree | 1dcf4a0b3233639173de60bf108874de2838c1f7 | |
parent | Merge branch 'jk/pack-objects-optim-mru' (diff) | |
parent | imap-send: Tell cURL to use imap:// or imaps:// (diff) | |
download | tgif-6d6321af1d66346f462ad599249d5ae02faf922e.tar.xz |
Merge branch 'ak/curl-imap-send-explicit-scheme'
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://
-rw-r--r-- | imap-send.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/imap-send.c b/imap-send.c index 0f5f4760e9..adb9738c30 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, '/'); |