diff options
author | Masaya Suzuki <masayasuzuki@google.com> | 2019-01-10 11:33:47 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-10 15:00:56 -0800 |
commit | e6cf87b12d3b85b31637c865bbfaed62c3e59e94 (patch) | |
tree | af69d47ea93b11b324f235e1d6ab8d192b8cd03e /remote-curl.c | |
parent | 8dd2e88a923bd24775182f0a507c993e06a0aacb (diff) | |
download | git-e6cf87b12d3b85b31637c865bbfaed62c3e59e94.tar.gz |
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>
Diffstat (limited to 'remote-curl.c')
-rw-r--r-- | remote-curl.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/remote-curl.c b/remote-curl.c index 1220dffcdc..d8eda2380a 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) { |