File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -1788,7 +1788,7 @@ static int http_request(const char *url,
1788
1788
1789
1789
curl_easy_setopt (slot -> curl , CURLOPT_URL , url );
1790
1790
curl_easy_setopt (slot -> curl , CURLOPT_HTTPHEADER , headers );
1791
- curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "gzip " );
1791
+ curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "" );
1792
1792
1793
1793
ret = run_one_slot (slot , & results );
1794
1794
Original file line number Diff line number Diff line change @@ -684,7 +684,7 @@ static int post_rpc(struct rpc_state *rpc)
684
684
curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0 );
685
685
curl_easy_setopt (slot -> curl , CURLOPT_POST , 1 );
686
686
curl_easy_setopt (slot -> curl , CURLOPT_URL , rpc -> service_url );
687
- curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "gzip " );
687
+ curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "" );
688
688
689
689
if (large_request ) {
690
690
/* The request body is large and the size cannot be predicted.
@@ -1259,6 +1259,7 @@ static int proxy_request(struct proxy_state *p)
1259
1259
1260
1260
slot = get_active_slot ();
1261
1261
1262
+ curl_easy_setopt (slot -> curl , CURLOPT_ENCODING , "" );
1262
1263
curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0 );
1263
1264
curl_easy_setopt (slot -> curl , CURLOPT_POST , 1 );
1264
1265
curl_easy_setopt (slot -> curl , CURLOPT_URL , p -> service_url );
Original file line number Diff line number Diff line change @@ -26,14 +26,14 @@ setup_askpass_helper
26
26
cat > exp << EOF
27
27
> GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
28
28
> Accept: */*
29
- > Accept-Encoding: gzip
29
+ > Accept-Encoding: ENCODINGS
30
30
> Pragma: no-cache
31
31
< HTTP/1.1 200 OK
32
32
< Pragma: no-cache
33
33
< Cache-Control: no-cache, max-age=0, must-revalidate
34
34
< Content-Type: application/x-git-upload-pack-advertisement
35
35
> POST /smart/repo.git/git-upload-pack HTTP/1.1
36
- > Accept-Encoding: gzip
36
+ > Accept-Encoding: ENCODINGS
37
37
> Content-Type: application/x-git-upload-pack-request
38
38
> Accept: application/x-git-upload-pack-result
39
39
> Content-Length: xxx
@@ -79,8 +79,13 @@ test_expect_success 'clone http repository' '
79
79
/^< Date: /d
80
80
/^< Content-Length: /d
81
81
/^< Transfer-Encoding: /d
82
- " >act &&
83
- test_cmp exp act
82
+ " >actual &&
83
+ sed -e "s/^> Accept-Encoding: .*/> Accept-Encoding: ENCODINGS/" \
84
+ actual >actual.smudged &&
85
+ test_cmp exp actual.smudged &&
86
+
87
+ grep "Accept-Encoding:.*gzip" actual >actual.gzip &&
88
+ test_line_count = 2 actual.gzip
84
89
'
85
90
86
91
test_expect_success ' fetch changes via http' '
You can’t perform that action at this time.
0 commit comments