Skip to content

Commit 0a8fcbd

Browse files
spearcegitster
authored andcommitted
t5551-http-fetch: Work around some libcurl versions
Some versions of libcurl report their output when GIT_CURL_VERBOSE is set differently than other versions do. At least one variant (version unknown but likely pre-7.18.1) reports the POST payload to stderr, and omits the blank line after each HTTP request/response. We clip these lines out of the stderr output now before doing the compare, so we aren't surprised by this trivial difference. Reported-by: Tarmigan <[email protected]> Signed-off-by: Shawn O. Pearce <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 34b6cb8 commit 0a8fcbd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/t5551-http-fetch.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,19 @@ cat >exp <<EOF
3131
> GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
3232
> Accept: */*
3333
> Pragma: no-cache
34-
3534
< HTTP/1.1 200 OK
3635
< Pragma: no-cache
3736
< Cache-Control: no-cache, max-age=0, must-revalidate
3837
< Content-Type: application/x-git-upload-pack-advertisement
39-
<
4038
> POST /smart/repo.git/git-upload-pack HTTP/1.1
4139
> Accept-Encoding: deflate, gzip
4240
> Content-Type: application/x-git-upload-pack-request
4341
> Accept: application/x-git-upload-pack-response
4442
> Content-Length: xxx
45-
4643
< HTTP/1.1 200 OK
4744
< Pragma: no-cache
4845
< Cache-Control: no-cache, max-age=0, must-revalidate
4946
< Content-Type: application/x-git-upload-pack-result
50-
<
5147
EOF
5248
test_expect_success 'clone http repository' '
5349
GIT_CURL_VERBOSE=1 git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&
@@ -56,6 +52,8 @@ test_expect_success 'clone http repository' '
5652
sed -e "
5753
s/Q\$//
5854
/^[*] /d
55+
/^$/d
56+
/^< $/d
5957
6058
/^[^><]/{
6159
s/^/> /
@@ -64,6 +62,8 @@ test_expect_success 'clone http repository' '
6462
/^> User-Agent: /d
6563
/^> Host: /d
6664
s/^> Content-Length: .*/> Content-Length: xxx/
65+
/^> 00..want /d
66+
/^> 00.*done/d
6767
6868
/^< Server: /d
6969
/^< Expires: /d

0 commit comments

Comments
 (0)