Skip to content

Commit d2d07ab

Browse files
anderskgitster
authored andcommitted
imap-send: Tell cURL to use imap:// or imaps://
Right now the imap:// or imaps:// part of imap.host is not being passed on to cURL. Perhaps it was able to guess correctly under some circumstances, but I was not able to find one; it was just trying to make HTTP requests for me. It’s better to be explicit in any case. Signed-off-by: Anders Kaseorg <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0b65a8d commit d2d07ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

imap-send.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
14101410
curl_easy_setopt(curl, CURLOPT_USERNAME, server.user);
14111411
curl_easy_setopt(curl, CURLOPT_PASSWORD, server.pass);
14121412

1413+
strbuf_addstr(&path, server.use_ssl ? "imaps://" : "imap://");
14131414
strbuf_addstr(&path, server.host);
14141415
if (!path.len || path.buf[path.len - 1] != '/')
14151416
strbuf_addch(&path, '/');

0 commit comments

Comments
 (0)