@@ -23,26 +23,26 @@ test_expect_success 'create http-accessible bare repository' '
23
23
24
24
setup_askpass_helper
25
25
26
- cat > exp << EOF
27
- > GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
28
- > Accept: */*
29
- > Accept-Encoding: ENCODINGS
30
- > Pragma: no-cache
31
- < HTTP/1.1 200 OK
32
- < Pragma: no-cache
33
- < Cache-Control: no-cache, max-age=0, must-revalidate
34
- < Content-Type: application/x-git-upload-pack-advertisement
35
- > POST /smart/repo.git/git-upload-pack HTTP/1.1
36
- > Accept-Encoding: ENCODINGS
37
- > Content-Type: application/x-git-upload-pack-request
38
- > Accept: application/x-git-upload-pack-result
39
- > Content-Length: xxx
40
- < HTTP/1.1 200 OK
41
- < Pragma: no-cache
42
- < Cache-Control: no-cache, max-age=0, must-revalidate
43
- < Content-Type: application/x-git-upload-pack-result
44
- EOF
45
26
test_expect_success ' clone http repository' '
27
+ cat >exp <<-\EOF &&
28
+ > GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1
29
+ > Accept: */*
30
+ > Accept-Encoding: ENCODINGS
31
+ > Pragma: no-cache
32
+ < HTTP/1.1 200 OK
33
+ < Pragma: no-cache
34
+ < Cache-Control: no-cache, max-age=0, must-revalidate
35
+ < Content-Type: application/x-git-upload-pack-advertisement
36
+ > POST /smart/repo.git/git-upload-pack HTTP/1.1
37
+ > Accept-Encoding: ENCODINGS
38
+ > Content-Type: application/x-git-upload-pack-request
39
+ > Accept: application/x-git-upload-pack-result
40
+ > Content-Length: xxx
41
+ < HTTP/1.1 200 OK
42
+ < Pragma: no-cache
43
+ < Cache-Control: no-cache, max-age=0, must-revalidate
44
+ < Content-Type: application/x-git-upload-pack-result
45
+ EOF
46
46
GIT_TRACE_CURL=true git clone --quiet $HTTPD_URL/smart/repo.git clone 2>err &&
47
47
test_cmp file clone/file &&
48
48
tr ' \' ' \015' \' ' Q <err |
@@ -96,13 +96,13 @@ test_expect_success 'fetch changes via http' '
96
96
test_cmp file clone/file
97
97
'
98
98
99
- cat > exp << EOF
100
- GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
101
- POST /smart/repo.git/git-upload-pack HTTP/1.1 200
102
- GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
103
- POST /smart/repo.git/git-upload-pack HTTP/1.1 200
104
- EOF
105
99
test_expect_success ' used upload-pack service' '
100
+ cat >exp <<-\EOF &&
101
+ GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
102
+ POST /smart/repo.git/git-upload-pack HTTP/1.1 200
103
+ GET /smart/repo.git/info/refs?service=git-upload-pack HTTP/1.1 200
104
+ POST /smart/repo.git/git-upload-pack HTTP/1.1 200
105
+ EOF
106
106
check_access_log exp
107
107
'
108
108
@@ -203,19 +203,19 @@ test_expect_success 'dumb clone via http-backend respects namespace' '
203
203
test_cmp expect actual
204
204
'
205
205
206
- cat > cookies.txt << EOF
207
- 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
208
- EOF
209
- cat > expect_cookies.txt << EOF
210
-
211
- 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
212
- 127.0.0.1 FALSE /smart_cookies/repo.git/info/ FALSE 0 name value
213
- EOF
214
206
test_expect_success ' cookies stored in http.cookiefile when http.savecookies set' '
207
+ cat >cookies.txt <<-\EOF &&
208
+ 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
209
+ EOF
210
+ sort >expect_cookies.txt <<-\EOF &&
211
+
212
+ 127.0.0.1 FALSE /smart_cookies/ FALSE 0 othername othervalue
213
+ 127.0.0.1 FALSE /smart_cookies/repo.git/info/ FALSE 0 name value
214
+ EOF
215
215
git config http.cookiefile cookies.txt &&
216
216
git config http.savecookies true &&
217
217
git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&
218
- tail -3 cookies.txt >cookies_tail.txt &&
218
+ tail -3 cookies.txt | sort >cookies_tail.txt &&
219
219
test_cmp expect_cookies.txt cookies_tail.txt
220
220
'
221
221
0 commit comments