path: root/remote-curl.c
diff options
authorMasaya Suzuki <>2019-01-10 19:33:47 (GMT)
committerJunio C Hamano <>2019-01-10 23:00:56 (GMT)
commite6cf87b12d3b85b31637c865bbfaed62c3e59e94 (patch)
treeaf69d47ea93b11b324f235e1d6ab8d192b8cd03e /remote-curl.c
parent8dd2e88a923bd24775182f0a507c993e06a0aacb (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'remote-curl.c')
1 files changed, 0 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 1220dff..d8eda23 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -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) {