From 6d052d78d74e581dd93dd6328d3c214f469e34d7 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 5 Apr 2013 18:14:06 -0400 Subject: http: add HTTP_KEEP_ERROR option We currently set curl's FAILONERROR option, which means that any http failures are reported as curl errors, and the http body content from the server is thrown away. This patch introduces a new option to http_get_strbuf which specifies that the body content from a failed http response should be placed in the destination strbuf, where it can be accessed by the caller. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- http.h | 1 + 1 file changed, 1 insertion(+) (limited to 'http.h') diff --git a/http.h b/http.h index 25d193139..0fe54f413 100644 --- a/http.h +++ b/http.h @@ -118,6 +118,7 @@ extern char *get_remote_object_url(const char *url, const char *hex, /* Options for http_request_*() */ #define HTTP_NO_CACHE 1 +#define HTTP_KEEP_ERROR 2 /* Return values for http_request_*() */ #define HTTP_OK 0 -- cgit v1.2.1