aboutsummaryrefslogtreecommitdiff
path: root/remote-curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'remote-curl.c')
-rw-r--r--remote-curl.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/remote-curl.c b/remote-curl.c
index 5b3ce9eed..ed1499b62 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -187,6 +187,7 @@ static struct discovery* discover_refs(const char *service, int for_push)
struct discovery *last = last_discovery;
char *refs_url;
int http_ret, maybe_smart = 0;
+ struct http_get_options options;
if (last && !strcmp(service, last->service))
return last;
@@ -204,8 +205,12 @@ static struct discovery* discover_refs(const char *service, int for_push)
}
refs_url = strbuf_detach(&buffer, NULL);
- http_ret = http_get_strbuf(refs_url, &type, &buffer,
- HTTP_NO_CACHE | HTTP_KEEP_ERROR);
+ memset(&options, 0, sizeof(options));
+ options.content_type = &type;
+ options.no_cache = 1;
+ options.keep_error = 1;
+
+ http_ret = http_get_strbuf(refs_url, &buffer, &options);
switch (http_ret) {
case HTTP_OK:
break;