Skip to content

Commit eaf6a1b

Browse files
bmwillgitster
authored andcommitted
remote-curl: accept compressed responses with protocol v2
Configure curl to accept compressed responses when using protocol v2 by setting `CURLOPT_ENCODING` to "", which indicates that curl should send an "Accept-Encoding" header with all supported compression encodings. Signed-off-by: Brandon Williams <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1a53e69 commit eaf6a1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

remote-curl.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,7 @@ static int proxy_request(struct proxy_state *p)
12591259

12601260
slot = get_active_slot();
12611261

1262+
curl_easy_setopt(slot->curl, CURLOPT_ENCODING, "");
12621263
curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
12631264
curl_easy_setopt(slot->curl, CURLOPT_POST, 1);
12641265
curl_easy_setopt(slot->curl, CURLOPT_URL, p->service_url);

0 commit comments

Comments
 (0)