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,
17881788
17891789 curl_easy_setopt (slot -> curl , CURLOPT_URL , url );
17901790 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 , "" );
17921792
17931793 ret = run_one_slot (slot , & results );
17941794
Original file line number Diff line number Diff line change @@ -684,7 +684,7 @@ static int post_rpc(struct rpc_state *rpc)
684684 curl_easy_setopt (slot -> curl , CURLOPT_NOBODY , 0 );
685685 curl_easy_setopt (slot -> curl , CURLOPT_POST , 1 );
686686 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 , "" );
688688
689689 if (large_request ) {
690690 /* The request body is large and the size cannot be predicted.
@@ -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 );
Original file line number Diff line number Diff line change @@ -26,14 +26,14 @@ setup_askpass_helper
2626cat > exp << EOF
2727> GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
2828> Accept: */*
29- > Accept-Encoding: gzip
29+ > Accept-Encoding: ENCODINGS
3030> Pragma: no-cache
3131< HTTP/1.1 200 OK
3232< Pragma: no-cache
3333< Cache-Control: no-cache, max-age=0, must-revalidate
3434< Content-Type: application/x-git-upload-pack-advertisement
3535> POST /smart/repo.git/git-upload-pack HTTP/1.1
36- > Accept-Encoding: gzip
36+ > Accept-Encoding: ENCODINGS
3737> Content-Type: application/x-git-upload-pack-request
3838> Accept: application/x-git-upload-pack-result
3939> Content-Length: xxx
@@ -79,8 +79,13 @@ test_expect_success 'clone http repository' '
7979 /^< Date: /d
8080 /^< Content-Length: /d
8181 /^< 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
8489'
8590
8691test_expect_success ' fetch changes via http' '
You can’t perform that action at this time.
0 commit comments