diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-04-16 19:28:11 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-04-16 19:28:11 +0900 |
| commit | 3151a5fc454ddab36baa9ca91b51fb255cc5ee6f (patch) | |
| tree | b1ed34ee30db5c3a79499defc32d5c8be501cc78 /http.h | |
| parent | Merge branch 'jh/midx-verify-too-many-packs' (diff) | |
| parent | http: use normalize_curl_result() instead of manual conversion (diff) | |
| download | git-3151a5fc454ddab36baa9ca91b51fb255cc5ee6f.tar.gz git-3151a5fc454ddab36baa9ca91b51fb255cc5ee6f.zip | |
Merge branch 'jk/http-walker-status-fix'
dumb-http walker has been updated to share more error recovery
strategy with the normal codepath.
* jk/http-walker-status-fix:
http: use normalize_curl_result() instead of manual conversion
http: normalize curl results for dumb loose and alternates fetches
http: factor out curl result code normalization
Diffstat (limited to 'http.h')
| -rw-r--r-- | http.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -136,6 +136,15 @@ static inline int missing__target(int code, int result) #define missing_target(a) missing__target((a)->http_code, (a)->curl_result) +/* + * Normalize curl results to handle CURL_FAILONERROR (or lack thereof). Failing + * http codes have their "result" converted to CURLE_HTTP_RETURNED_ERROR, and + * an appropriate string placed in the errorstr buffer (pass curl_errorstr if + * you don't have a custom buffer). + */ +void normalize_curl_result(CURLcode *result, long http_code, char *errorstr, + size_t errorlen); + /* Helpers for modifying and creating URLs */ extern void append_remote_object_url(struct strbuf *buf, const char *url, const char *hex, |
