Skip to content

Commit 2202ab1

Browse files
committed
Merge branch 'km/imap-send-libcurl-options'
Now imap-send learned to talk to the server using cURL library, allow the same GIT_CURL_VERBOSE environment variable to control the verbosity of the chattering. * km/imap-send-libcurl-options: imap-send.c: set CURLOPT_USE_SSL to CURLUSESSL_TRY imap-send.c: support GIT_CURL_VERBOSE
2 parents 6d9f0c7 + 230c09c commit 2202ab1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

imap-send.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,8 +1421,8 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
14211421
strbuf_release(&auth);
14221422
}
14231423

1424-
if (server.use_ssl)
1425-
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_ALL);
1424+
if (!server.use_ssl)
1425+
curl_easy_setopt(curl, CURLOPT_USE_SSL, (long)CURLUSESSL_TRY);
14261426

14271427
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, server.ssl_verify);
14281428
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, server.ssl_verify);
@@ -1431,7 +1431,7 @@ static CURL *setup_curl(struct imap_server_conf *srvc)
14311431

14321432
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
14331433

1434-
if (0 < verbosity)
1434+
if (0 < verbosity || getenv("GIT_CURL_VERBOSE"))
14351435
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
14361436

14371437
return curl;

0 commit comments

Comments
 (0)