Skip to content

Commit 2036663

Browse files
spearcegitster
authored andcommitted
t5551-http-fetch: Work around broken Accept header in libcurl
Unfortunately at least one version of libcurl has a bug causing it to include "Accept: */*" in the same POST request where we have already asked for "Accept: application/x-git-upload-pack-response". This is a bug in libcurl, not Git, or our test vector. The application has explicitly asked the server for a single content type, but libcurl has mistakenly also told the server the client application will accept */*, which is any content type. Based on the libcurl change log, this "Accept: */*" header bug may have been fixed in version 7.18.1 released March 30, 2008: http://curl.haxx.se/changes.html#7_18_1 Rather than require users to upgrade libcurl we change the test vector to trim this line out of the 2nd request. Reported-by: Tarmigan <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0a8fcbd commit 2036663

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

t/t5551-http-fetch.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ test_expect_success 'clone http repository' '
6161
6262
/^> User-Agent: /d
6363
/^> Host: /d
64+
/^> POST /,$ {
65+
/^> Accept: [*]\\/[*]/d
66+
}
6467
s/^> Content-Length: .*/> Content-Length: xxx/
6568
/^> 00..want /d
6669
/^> 00.*done/d

0 commit comments

Comments
 (0)