X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=http.h;h=173f74c8298c3fa3989f88b06e2085127fe96db8;hb=e93368d26ebcf69698b8454afb85c9c84bd54363;hp=5c9441c10ce708be426afe7424d63dcbb68a49e2;hpb=28bf4ba014c9b41679f41580fa9e1cc294b240d9;p=git.git diff --git a/http.h b/http.h index 5c9441c10..173f74c82 100644 --- a/http.h +++ b/http.h @@ -23,10 +23,10 @@ #endif #if LIBCURL_VERSION_NUM < 0x070704 -#define curl_global_cleanup() do { /* nothing */ } while(0) +#define curl_global_cleanup() do { /* nothing */ } while (0) #endif #if LIBCURL_VERSION_NUM < 0x070800 -#define curl_global_init(a) do { /* nothing */ } while(0) +#define curl_global_init(a) do { /* nothing */ } while (0) #endif #if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000) @@ -117,6 +117,7 @@ extern void append_remote_object_url(struct strbuf *buf, const char *url, int only_two_digit_prefix); extern char *get_remote_object_url(const char *url, const char *hex, int only_two_digit_prefix); +extern void end_url_with_slash(struct strbuf *buf, const char *url); /* Options for http_request_*() */ #define HTTP_NO_CACHE 1 @@ -126,6 +127,8 @@ extern char *get_remote_object_url(const char *url, const char *hex, #define HTTP_MISSING_TARGET 1 #define HTTP_ERROR 2 #define HTTP_START_FAILED 3 +#define HTTP_REAUTH 4 +#define HTTP_NOAUTH 5 /* * Requests an url and stores the result in a strbuf. @@ -152,7 +155,6 @@ struct http_pack_request struct packed_git *target; struct packed_git **lst; FILE *packfile; - char filename[PATH_MAX]; char tmpfile[PATH_MAX]; struct curl_slist *range_header; struct active_request_slot *slot; @@ -167,7 +169,6 @@ extern void release_http_pack_request(struct http_pack_request *preq); struct http_object_request { char *url; - char filename[PATH_MAX]; char tmpfile[PATH_MAX]; int localfile; CURLcode curl_result;