aboutsummaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-10-31 02:35:31 -0400
committerJunio C Hamano <gitster@pobox.com>2013-10-31 10:05:55 -0700
commit0972ccd97cc8f913ea828a1e03ef3652fc1ff514 (patch)
tree7f4855620b5553fa21c3e8c302f356e96168ca68 /http.h
parent02a110ad435a6ccda648f09f94e546dfd7bdd0ac (diff)
downloadgit-0972ccd97cc8f913ea828a1e03ef3652fc1ff514.tar.gz
git-0972ccd97cc8f913ea828a1e03ef3652fc1ff514.tar.xz
http: return curl's AUTHAVAIL via slot_results
Callers of the http code may want to know which auth types were available for the previous request. But after finishing with the curl slot, they are not supposed to look at the curl handle again. We already handle returning other information via the slot_results struct; let's add a flag to check the available auth. Note that older versions of curl did not support this, so we simply return 0 (something like "-1" would be worse, as the value is a bitflag and we might accidentally set a flag). This is sufficient for the callers planned in this series, who only trigger some optional behavior if particular bits are set, and can live with a fake "no bits" answer. Signed-off-by: Jeff King <peff@peff.net>
Diffstat (limited to 'http.h')
-rw-r--r--http.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/http.h b/http.h
index d77c1b54f..81d484329 100644
--- a/http.h
+++ b/http.h
@@ -54,6 +54,7 @@
struct slot_results {
CURLcode curl_result;
long http_code;
+ long auth_avail;
};
struct active_request_slot {