http: enable keep_error for HTTP requests
curl stops parsing a response when it sees a bad HTTP status code and it has CURLOPT_FAILONERROR set. This prevents GIT_CURL_VERBOSE to show HTTP headers on error. keep_error is an option to receive the HTTP response body for those error responses. By enabling this option, curl will process the HTTP response headers, and they're shown if GIT_CURL_VERBOSE is set. Signed-off-by: Masaya Suzuki <masayasuzuki@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
8dd2e88a92
commit
e6cf87b12d
@ -380,7 +380,6 @@ static struct discovery *discover_refs(const char *service, int for_push)
|
||||
http_options.extra_headers = &extra_headers;
|
||||
http_options.initial_request = 1;
|
||||
http_options.no_cache = 1;
|
||||
http_options.keep_error = 1;
|
||||
|
||||
http_ret = http_get_strbuf(refs_url.buf, &buffer, &http_options);
|
||||
switch (http_ret) {
|
||||
|
||||
Reference in New Issue
Block a user