diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-01-17 14:49:29 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-01-17 14:49:29 -0800 |
commit | 5ce6f51ff78bcb847c6c4835d80f6b58d730a8de (patch) | |
tree | 029e49495079444591cb804fd4a12b39a34ab9ca /http.h | |
parent | 7479ca4b44193acee43c480ae37e0bec98316f7a (diff) | |
parent | 3680f16f9d6832dc78c6b80f1e8a546385d946f9 (diff) | |
download | git-5ce6f51ff78bcb847c6c4835d80f6b58d730a8de.tar.gz git-5ce6f51ff78bcb847c6c4835d80f6b58d730a8de.tar.xz |
Merge branch 'jk/http-walker-limit-redirect' into maint
Update the error messages from the dumb-http client when it fails
to obtain loose objects; we used to give sensible error message
only upon 404 but we now forbid unexpected redirects that needs to
be reported with something sensible.
* jk/http-walker-limit-redirect:
http-walker: complain about non-404 loose object errors
http: treat http-alternates like redirects
http: make redirects more obvious
remote-curl: rename shadowed options variable
http: always update the base URL for redirects
http: simplify update_url_from_redirect
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -116,6 +116,13 @@ extern struct credential http_auth; extern char curl_errorstr[CURL_ERROR_SIZE]; +enum http_follow_config { + HTTP_FOLLOW_NONE, + HTTP_FOLLOW_ALWAYS, + HTTP_FOLLOW_INITIAL +}; +extern enum http_follow_config http_follow_config; + static inline int missing__target(int code, int result) { return /* file:// URL -- do we ever use one??? */ @@ -139,7 +146,8 @@ extern char *get_remote_object_url(const char *url, const char *hex, /* Options for http_get_*() */ struct http_get_options { unsigned no_cache:1, - keep_error:1; + keep_error:1, + initial_request:1; /* If non-NULL, returns the content-type of the response. */ struct strbuf *content_type; |