Merge branch 'jk/fix-remote-curl-url-wo-proto'

"git fetch http::/site/path" did not die correctly and segfaulted
instead.

* jk/fix-remote-curl-url-wo-proto:
  remote-curl: handle URLs without protocol
This commit is contained in:
Junio C Hamano
2016-09-15 14:11:15 -07:00
2 changed files with 9 additions and 1 deletions

2
http.c
View File

@ -723,7 +723,7 @@ static CURL *get_curl_handle(void)
* precedence here, as in CURL.
*/
if (!curl_http_proxy) {
if (!strcmp(http_auth.protocol, "https")) {
if (http_auth.protocol && !strcmp(http_auth.protocol, "https")) {
var_override(&curl_http_proxy, getenv("HTTPS_PROXY"));
var_override(&curl_http_proxy, getenv("https_proxy"));
} else {