##// END OF EJS Templates
tests: refactor common bundle2 capabilities...
Joerg Sonnenberger -
r38751:88be288e @86 default
parent child Browse files
Show More
@@ -1,179 +1,193 b''
1 1 # common patterns in test at can safely be replaced
2 2 from __future__ import absolute_import
3 3
4 4 import os
5 5
6 6 substitutions = [
7 7 # list of possible compressions
8 8 (br'(zstd,)?zlib,none,bzip2',
9 9 br'$USUAL_COMPRESSIONS$'
10 10 ),
11 11 (br'=(zstd,)?zlib',
12 12 br'=$BUNDLE2_COMPRESSIONS$'
13 13 ),
14 14 # capabilities sent through http
15 15 (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
16 16 br'bookmarks%250A'
17 17 br'changegroup%253D01%252C02%250A'
18 18 br'digests%253Dmd5%252Csha1%252Csha512%250A'
19 19 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
20 20 br'hgtagsfnodes%250A'
21 21 br'listkeys%250A'
22 22 br'phases%253Dheads%250A'
23 23 br'pushkey%250A'
24 24 br'remote-changegroup%253Dhttp%252Chttps%250A'
25 25 br'rev-branch-cache%250A'
26 26 br'stream%253Dv2',
27 27 # (the replacement patterns)
28 28 br'$USUAL_BUNDLE_CAPS$'
29 29 ),
30 30 (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
31 31 br'bookmarks%250A'
32 32 br'changegroup%253D01%252C02%250A'
33 33 br'digests%253Dmd5%252Csha1%252Csha512%250A'
34 34 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
35 35 br'hgtagsfnodes%250A'
36 36 br'listkeys%250A'
37 37 br'phases%253Dheads%250A'
38 38 br'pushkey%250A'
39 39 br'remote-changegroup%253Dhttp%252Chttps',
40 40 # (the replacement patterns)
41 41 br'$USUAL_BUNDLE_CAPS_SERVER$'
42 42 ),
43 43 # bundle2 capabilities sent through ssh
44 44 (br'bundle2=HG20%0A'
45 45 br'bookmarks%0A'
46 46 br'changegroup%3D01%2C02%0A'
47 47 br'digests%3Dmd5%2Csha1%2Csha512%0A'
48 48 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
49 49 br'hgtagsfnodes%0A'
50 50 br'listkeys%0A'
51 51 br'phases%3Dheads%0A'
52 52 br'pushkey%0A'
53 53 br'remote-changegroup%3Dhttp%2Chttps%0A'
54 54 br'rev-branch-cache%0A'
55 55 br'stream%3Dv2',
56 56 # (replacement patterns)
57 57 br'$USUAL_BUNDLE2_CAPS$'
58 58 ),
59 59 # bundle2 capabilities advertised by the server
60 60 (br'bundle2=HG20%0A'
61 61 br'bookmarks%0A'
62 62 br'changegroup%3D01%2C02%0A'
63 63 br'digests%3Dmd5%2Csha1%2Csha512%0A'
64 64 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
65 65 br'hgtagsfnodes%0A'
66 66 br'listkeys%0A'
67 67 br'phases%3Dheads%0A'
68 68 br'pushkey%0A'
69 69 br'remote-changegroup%3Dhttp%2Chttps%0A'
70 70 br'rev-branch-cache',
71 71 # (replacement patterns)
72 72 br'$USUAL_BUNDLE2_CAPS_SERVER$'
73 73 ),
74 (
75 br'bundle2=HG20%0A'
76 br'bookmarks%0A'
77 br'changegroup%3D01%2C02%0A'
78 br'digests%3Dmd5%2Csha1%2Csha512%0A'
79 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
80 br'hgtagsfnodes%0A'
81 br'listkeys%0A'
82 br'pushkey%0A'
83 br'remote-changegroup%3Dhttp%2Chttps%0A'
84 br'rev-branch-cache',
85 # (replacement patterns)
86 br'$USUAL_BUNDLE2_CAPS_NO_PHASES$'
87 ),
74 88 # HTTP access log dates
75 89 (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)',
76 90 lambda m: br' - - [$LOGDATE$] "' + m.group(1)
77 91 ),
78 92 # HTTP error log dates
79 93 (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] (HG error:|Exception)',
80 94 lambda m: br' - - [$ERRDATE$] ' + m.group(1)
81 95 ),
82 96 # HTTP header dates- RFC 1123
83 97 (br'([Dd]ate): [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT',
84 98 lambda m: br'%s: $HTTP_DATE$' % m.group(1)
85 99 ),
86 100 # LFS expiration value
87 101 (br'"expires_at": "\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ"',
88 102 br'"expires_at": "$ISO_8601_DATE_TIME$"'
89 103 ),
90 104 # Windows has an extra '/' in the following lines that get globbed away:
91 105 # pushing to file:/*/$TESTTMP/r2 (glob)
92 106 # comparing with file:/*/$TESTTMP/r2 (glob)
93 107 # sub/maybelarge.dat: largefile 34..9c not available from
94 108 # file:/*/$TESTTMP/largefiles-repo (glob)
95 109 (br'(.*file:/)/?(/\$TESTTMP.*)',
96 110 lambda m: m.group(1) + b'*' + m.group(2) + b' (glob)'
97 111 ),
98 112 ]
99 113
100 114 # Various platform error strings, keyed on a common replacement string
101 115 _errors = {
102 116 br'$ENOENT$': (
103 117 # strerror()
104 118 br'No such file or directory',
105 119
106 120 # FormatMessage(ERROR_FILE_NOT_FOUND)
107 121 br'The system cannot find the file specified',
108 122 ),
109 123 br'$ENOTDIR$': (
110 124 # strerror()
111 125 br'Not a directory',
112 126
113 127 # FormatMessage(ERROR_PATH_NOT_FOUND)
114 128 br'The system cannot find the path specified',
115 129 ),
116 130 br'$ECONNRESET$': (
117 131 # strerror()
118 132 br'Connection reset by peer',
119 133
120 134 # FormatMessage(WSAECONNRESET)
121 135 br'An existing connection was forcibly closed by the remote host',
122 136 ),
123 137 br'$EADDRINUSE$': (
124 138 # strerror()
125 139 br'Address already in use',
126 140
127 141 # FormatMessage(WSAEADDRINUSE)
128 142 br'Only one usage of each socket address'
129 143 br' \(protocol/network address/port\) is normally permitted',
130 144 ),
131 145 }
132 146
133 147 for replace, msgs in _errors.items():
134 148 substitutions.extend((m, replace) for m in msgs)
135 149
136 150 # Output lines on Windows that can be autocorrected for '\' vs '/' path
137 151 # differences.
138 152 _winpathfixes = [
139 153 # cloning subrepo s\ss from $TESTTMP/t/s/ss
140 154 # cloning subrepo foo\bar from http://localhost:$HGPORT/foo/bar
141 155 br'(?m)^cloning subrepo \S+\\.*',
142 156
143 157 # pulling from $TESTTMP\issue1852a
144 158 br'(?m)^pulling from \$TESTTMP\\.*',
145 159
146 160 # pushing to $TESTTMP\a
147 161 br'(?m)^pushing to \$TESTTMP\\.*',
148 162
149 163 # pushing subrepo s\ss to $TESTTMP/t/s/ss
150 164 br'(?m)^pushing subrepo \S+\\\S+ to.*',
151 165
152 166 # moving d1\d11\a1 to d3/d11/a1
153 167 br'(?m)^moving \S+\\.*',
154 168
155 169 # d1\a: not recording move - dummy does not exist
156 170 br'\S+\\\S+: not recording move .+',
157 171
158 172 # reverting s\a
159 173 br'(?m)^reverting (?!subrepo ).*\\.*',
160 174
161 175 # saved backup bundle to
162 176 # $TESTTMP\test\.hg\strip-backup/443431ffac4f-2fc5398a-backup.hg
163 177 br'(?m)^saved backup bundle to \$TESTTMP.*\.hg',
164 178
165 179 # no changes made to subrepo s\ss since last push to ../tcc/s/ss
166 180 br'(?m)^no changes made to subrepo \S+\\\S+ since.*',
167 181
168 182 # changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing
169 183 # $TESTTMP\largefiles-repo-hg\.hg\largefiles\76..38
170 184 br'(?m)^changeset .* references (corrupted|missing) \$TESTTMP\\.*',
171 185
172 186 # stuff/maybelarge.dat: largefile 76..38 not available from
173 187 # file:/*/$TESTTMP\largefiles-repo (glob)
174 188 br'.*: largefile \S+ not available from file:/\*/.+',
175 189 ]
176 190
177 191 if os.name == 'nt':
178 192 substitutions.extend([(s, lambda match: match.group().replace(b'\\', b'/'))
179 193 for s in _winpathfixes])
@@ -1,914 +1,914 b''
1 1 #require serve zstd
2 2
3 3 Client version is embedded in HTTP request and is effectively dynamic. Pin the
4 4 version so behavior is deterministic.
5 5
6 6 $ cat > fakeversion.py << EOF
7 7 > from mercurial import util
8 8 > util.version = lambda: '4.2'
9 9 > EOF
10 10
11 11 $ cat >> $HGRCPATH << EOF
12 12 > [extensions]
13 13 > fakeversion = `pwd`/fakeversion.py
14 14 > [devel]
15 15 > legacy.exchange = phases
16 16 > EOF
17 17
18 18 $ hg init server0
19 19 $ cd server0
20 20 $ touch foo
21 21 $ hg -q commit -A -m initial
22 22
23 23 Also disable compression because zstd is optional and causes output to vary
24 24 and because debugging partial responses is hard when compression is involved
25 25
26 26 $ cat > .hg/hgrc << EOF
27 27 > [extensions]
28 28 > badserver = $TESTDIR/badserverext.py
29 29 > [server]
30 30 > compressionengines = none
31 31 > EOF
32 32
33 33 Failure to accept() socket should result in connection related error message
34 34
35 35 $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid
36 36 $ cat hg.pid > $DAEMON_PIDS
37 37
38 38 $ hg clone http://localhost:$HGPORT/ clone
39 39 abort: error: $ECONNRESET$
40 40 [255]
41 41
42 42 (The server exits on its own, but there is a race between that and starting a new server.
43 43 So ensure the process is dead.)
44 44
45 45 $ killdaemons.py $DAEMON_PIDS
46 46
47 47 Failure immediately after accept() should yield connection related error message
48 48
49 49 $ hg serve --config badserver.closeafteraccept=true -p $HGPORT -d --pid-file=hg.pid
50 50 $ cat hg.pid > $DAEMON_PIDS
51 51
52 52 TODO: this usually outputs good results, but sometimes emits abort:
53 53 error: '' on FreeBSD and OS X.
54 54 What we ideally want are:
55 55
56 56 abort: error: $ECONNRESET$
57 57
58 58 The flakiness in this output was observable easily with
59 59 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2.
60 60 $ hg clone http://localhost:$HGPORT/ clone
61 61 abort: error: * (glob)
62 62 [255]
63 63
64 64 $ killdaemons.py $DAEMON_PIDS
65 65
66 66 Failure to read all bytes in initial HTTP request should yield connection related error message
67 67
68 68 $ hg serve --config badserver.closeafterrecvbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
69 69 $ cat hg.pid > $DAEMON_PIDS
70 70
71 71 $ hg clone http://localhost:$HGPORT/ clone
72 72 abort: error: bad HTTP status line: ''
73 73 [255]
74 74
75 75 $ killdaemons.py $DAEMON_PIDS
76 76
77 77 $ cat error.log
78 78 readline(1 from 65537) -> (1) G
79 79 read limit reached; closing socket
80 80
81 81 $ rm -f error.log
82 82
83 83 Same failure, but server reads full HTTP request line
84 84
85 85 $ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log
86 86 $ cat hg.pid > $DAEMON_PIDS
87 87 $ hg clone http://localhost:$HGPORT/ clone
88 88 abort: error: bad HTTP status line: ''
89 89 [255]
90 90
91 91 $ killdaemons.py $DAEMON_PIDS
92 92
93 93 $ cat error.log
94 94 readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
95 95 readline(7 from -1) -> (7) Accept-
96 96 read limit reached; closing socket
97 97
98 98 $ rm -f error.log
99 99
100 100 Failure on subsequent HTTP request on the same socket (cmd?batch)
101 101
102 102 $ hg serve --config badserver.closeafterrecvbytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
103 103 $ cat hg.pid > $DAEMON_PIDS
104 104 $ hg clone http://localhost:$HGPORT/ clone
105 105 abort: error: bad HTTP status line: ''
106 106 [255]
107 107
108 108 $ killdaemons.py $DAEMON_PIDS
109 109
110 110 $ cat error.log
111 111 readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
112 112 readline(177 from -1) -> (27) Accept-Encoding: identity\r\n
113 113 readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n
114 114 readline(115 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
115 115 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
116 116 readline(* from -1) -> (2) \r\n (glob)
117 117 write(36) -> HTTP/1.1 200 Script output follows\r\n
118 118 write(23) -> Server: badhttpserver\r\n
119 119 write(37) -> Date: $HTTP_DATE$\r\n
120 120 write(41) -> Content-Type: application/mercurial-0.1\r\n
121 121 write(21) -> Content-Length: 436\r\n
122 122 write(2) -> \r\n
123 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
123 write(436) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
124 124 readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
125 125 readline(1? from -1) -> (1?) Accept-Encoding* (glob)
126 126 read limit reached; closing socket
127 127 readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
128 128 readline(197 from -1) -> (27) Accept-Encoding: identity\r\n
129 129 readline(170 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
130 130 readline(141 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
131 131 readline(100 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
132 132 readline(39 from -1) -> (35) accept: application/mercurial-0.1\r\n
133 133 readline(4 from -1) -> (4) host
134 134 read limit reached; closing socket
135 135
136 136 $ rm -f error.log
137 137
138 138 Failure to read getbundle HTTP request
139 139
140 140 $ hg serve --config badserver.closeafterrecvbytes=308,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
141 141 $ cat hg.pid > $DAEMON_PIDS
142 142 $ hg clone http://localhost:$HGPORT/ clone
143 143 requesting all changes
144 144 abort: error: bad HTTP status line: ''
145 145 [255]
146 146
147 147 $ killdaemons.py $DAEMON_PIDS
148 148
149 149 $ cat error.log
150 150 readline(1 from -1) -> (1) x (?)
151 151 readline(1 from -1) -> (1) x (?)
152 152 readline(308 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
153 153 readline(275 from -1) -> (27) Accept-Encoding: identity\r\n
154 154 readline(248 from -1) -> (35) accept: application/mercurial-0.1\r\n
155 155 readline(213 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
156 156 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
157 157 readline(* from -1) -> (2) \r\n (glob)
158 158 write(36) -> HTTP/1.1 200 Script output follows\r\n
159 159 write(23) -> Server: badhttpserver\r\n
160 160 write(37) -> Date: $HTTP_DATE$\r\n
161 161 write(41) -> Content-Type: application/mercurial-0.1\r\n
162 162 write(21) -> Content-Length: 436\r\n
163 163 write(2) -> \r\n
164 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
164 write(436) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
165 165 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
166 166 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
167 167 readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
168 168 readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
169 169 readline(1? from -1) -> (1?) x-hgproto-1:* (glob)
170 170 read limit reached; closing socket
171 171 readline(317 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
172 172 readline(291 from -1) -> (27) Accept-Encoding: identity\r\n
173 173 readline(264 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
174 174 readline(235 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
175 175 readline(194 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
176 176 readline(133 from -1) -> (35) accept: application/mercurial-0.1\r\n
177 177 readline(98 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
178 178 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
179 179 readline(* from -1) -> (2) \r\n (glob)
180 180 write(36) -> HTTP/1.1 200 Script output follows\r\n
181 181 write(23) -> Server: badhttpserver\r\n
182 182 write(37) -> Date: $HTTP_DATE$\r\n
183 183 write(41) -> Content-Type: application/mercurial-0.1\r\n
184 184 write(20) -> Content-Length: 42\r\n
185 185 write(2) -> \r\n
186 186 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
187 187 readline(* from 65537) -> (*) GET /?cmd=getbundle HTTP* (glob)
188 188 read limit reached; closing socket
189 189 readline(304 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
190 190 readline(274 from -1) -> (27) Accept-Encoding: identity\r\n
191 191 readline(247 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
192 192 readline(218 from -1) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag
193 193 read limit reached; closing socket
194 194
195 195 $ rm -f error.log
196 196
197 197 Now do a variation using POST to send arguments
198 198
199 199 $ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log
200 200 $ cat hg.pid > $DAEMON_PIDS
201 201
202 202 $ hg clone http://localhost:$HGPORT/ clone
203 203 abort: error: bad HTTP status line: ''
204 204 [255]
205 205
206 206 $ killdaemons.py $DAEMON_PIDS
207 207
208 208 $ cat error.log
209 209 readline(329 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
210 210 readline(296 from -1) -> (27) Accept-Encoding: identity\r\n
211 211 readline(269 from -1) -> (35) accept: application/mercurial-0.1\r\n
212 212 readline(234 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
213 213 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
214 214 readline(* from -1) -> (2) \r\n (glob)
215 215 write(36) -> HTTP/1.1 200 Script output follows\r\n
216 216 write(23) -> Server: badhttpserver\r\n
217 217 write(37) -> Date: $HTTP_DATE$\r\n
218 218 write(41) -> Content-Type: application/mercurial-0.1\r\n
219 219 write(21) -> Content-Length: 449\r\n
220 220 write(2) -> \r\n
221 write(449) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
221 write(449) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
222 222 readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob)
223 223 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
224 224 readline(1?? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
225 225 readline(6? from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
226 226 readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob)
227 227 readline(1? from -1) -> (1?) x-hgproto-1: * (glob)
228 228 read limit reached; closing socket
229 229 readline(344 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
230 230 readline(317 from -1) -> (27) Accept-Encoding: identity\r\n
231 231 readline(290 from -1) -> (41) content-type: application/mercurial-0.1\r\n
232 232 readline(249 from -1) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n
233 233 readline(216 from -1) -> (19) x-hgargs-post: 28\r\n
234 234 readline(197 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
235 235 readline(136 from -1) -> (35) accept: application/mercurial-0.1\r\n
236 236 readline(101 from -1) -> (20) content-length: 28\r\n
237 237 readline(81 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
238 238 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
239 239 readline(* from -1) -> (2) \r\n (glob)
240 240 read(* from 28) -> (*) cmds=* (glob)
241 241 read limit reached, closing socket
242 242 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
243 243
244 244 $ rm -f error.log
245 245
246 246 Now move on to partial server responses
247 247
248 248 Server sends a single character from the HTTP response line
249 249
250 250 $ hg serve --config badserver.closeaftersendbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
251 251 $ cat hg.pid > $DAEMON_PIDS
252 252
253 253 $ hg clone http://localhost:$HGPORT/ clone
254 254 abort: error: bad HTTP status line: H
255 255 [255]
256 256
257 257 $ killdaemons.py $DAEMON_PIDS
258 258
259 259 $ cat error.log
260 260 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
261 261 readline(-1) -> (27) Accept-Encoding: identity\r\n
262 262 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
263 263 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
264 264 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
265 265 readline(-1) -> (2) \r\n
266 266 write(1 from 36) -> (0) H
267 267 write limit reached; closing socket
268 268 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
269 269
270 270 $ rm -f error.log
271 271
272 272 Server sends an incomplete capabilities response body
273 273
274 274 $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
275 275 $ cat hg.pid > $DAEMON_PIDS
276 276
277 277 $ hg clone http://localhost:$HGPORT/ clone
278 278 abort: HTTP request error (incomplete response; expected 416 bytes got 20)
279 279 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
280 280 [255]
281 281
282 282 $ killdaemons.py $DAEMON_PIDS
283 283
284 284 $ cat error.log
285 285 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
286 286 readline(-1) -> (27) Accept-Encoding: identity\r\n
287 287 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
288 288 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
289 289 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
290 290 readline(-1) -> (2) \r\n
291 291 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n
292 292 write(23 from 23) -> (121) Server: badhttpserver\r\n
293 293 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n
294 294 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
295 295 write(21 from 21) -> (22) Content-Length: 436\r\n
296 296 write(2 from 2) -> (20) \r\n
297 297 write(20 from 436) -> (0) batch branchmap bund
298 298 write limit reached; closing socket
299 299
300 300 $ rm -f error.log
301 301
302 302 Server sends incomplete headers for batch request
303 303
304 304 $ hg serve --config badserver.closeaftersendbytes=714 -p $HGPORT -d --pid-file=hg.pid -E error.log
305 305 $ cat hg.pid > $DAEMON_PIDS
306 306
307 307 TODO this output is horrible
308 308
309 309 $ hg clone http://localhost:$HGPORT/ clone
310 310 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
311 311 ---%<--- (applicat)
312 312
313 313 ---%<---
314 314 !
315 315 [255]
316 316
317 317 $ killdaemons.py $DAEMON_PIDS
318 318
319 319 $ cat error.log
320 320 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
321 321 readline(-1) -> (27) Accept-Encoding: identity\r\n
322 322 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
323 323 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
324 324 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
325 325 readline(-1) -> (2) \r\n
326 326 write(36 from 36) -> (678) HTTP/1.1 200 Script output follows\r\n
327 327 write(23 from 23) -> (655) Server: badhttpserver\r\n
328 328 write(37 from 37) -> (618) Date: $HTTP_DATE$\r\n
329 329 write(41 from 41) -> (577) Content-Type: application/mercurial-0.1\r\n
330 330 write(21 from 21) -> (556) Content-Length: 436\r\n
331 331 write(2 from 2) -> (554) \r\n
332 write(436 from 436) -> (118) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
332 write(436 from 436) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
333 333 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
334 334 readline(-1) -> (27) Accept-Encoding: identity\r\n
335 335 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
336 336 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
337 337 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
338 338 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
339 339 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
340 340 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
341 341 readline(-1) -> (2) \r\n
342 342 write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n
343 343 write(23 from 23) -> (59) Server: badhttpserver\r\n
344 344 write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n
345 345 write(22 from 41) -> (0) Content-Type: applicat
346 346 write limit reached; closing socket
347 347 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
348 348
349 349 $ rm -f error.log
350 350
351 351 Server sends an incomplete HTTP response body to batch request
352 352
353 353 $ hg serve --config badserver.closeaftersendbytes=779 -p $HGPORT -d --pid-file=hg.pid -E error.log
354 354 $ cat hg.pid > $DAEMON_PIDS
355 355
356 356 TODO client spews a stack due to uncaught ValueError in batch.results()
357 357 #if no-chg
358 358 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
359 359 [1]
360 360 #else
361 361 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
362 362 [255]
363 363 #endif
364 364
365 365 $ killdaemons.py $DAEMON_PIDS
366 366
367 367 $ cat error.log
368 368 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
369 369 readline(-1) -> (27) Accept-Encoding: identity\r\n
370 370 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
371 371 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
372 372 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
373 373 readline(-1) -> (2) \r\n
374 374 write(36 from 36) -> (743) HTTP/1.1 200 Script output follows\r\n
375 375 write(23 from 23) -> (720) Server: badhttpserver\r\n
376 376 write(37 from 37) -> (683) Date: $HTTP_DATE$\r\n
377 377 write(41 from 41) -> (642) Content-Type: application/mercurial-0.1\r\n
378 378 write(21 from 21) -> (621) Content-Length: 436\r\n
379 379 write(2 from 2) -> (619) \r\n
380 write(436 from 436) -> (183) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
380 write(436 from 436) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
381 381 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
382 382 readline(-1) -> (27) Accept-Encoding: identity\r\n
383 383 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
384 384 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
385 385 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
386 386 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
387 387 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
388 388 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
389 389 readline(-1) -> (2) \r\n
390 390 write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n
391 391 write(23 from 23) -> (124) Server: badhttpserver\r\n
392 392 write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n
393 393 write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n
394 394 write(20 from 20) -> (26) Content-Length: 42\r\n
395 395 write(2 from 2) -> (24) \r\n
396 396 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672
397 397 write limit reached; closing socket
398 398
399 399 $ rm -f error.log
400 400
401 401 Server sends incomplete headers for getbundle response
402 402
403 403 $ hg serve --config badserver.closeaftersendbytes=926 -p $HGPORT -d --pid-file=hg.pid -E error.log
404 404 $ cat hg.pid > $DAEMON_PIDS
405 405
406 406 TODO this output is terrible
407 407
408 408 $ hg clone http://localhost:$HGPORT/ clone
409 409 requesting all changes
410 410 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
411 411 ---%<--- (application/mercuri)
412 412
413 413 ---%<---
414 414 !
415 415 [255]
416 416
417 417 $ killdaemons.py $DAEMON_PIDS
418 418
419 419 $ cat error.log
420 420 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
421 421 readline(-1) -> (27) Accept-Encoding: identity\r\n
422 422 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
423 423 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
424 424 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
425 425 readline(-1) -> (2) \r\n
426 426 write(36 from 36) -> (890) HTTP/1.1 200 Script output follows\r\n
427 427 write(23 from 23) -> (867) Server: badhttpserver\r\n
428 428 write(37 from 37) -> (830) Date: $HTTP_DATE$\r\n
429 429 write(41 from 41) -> (789) Content-Type: application/mercurial-0.1\r\n
430 430 write(21 from 21) -> (768) Content-Length: 436\r\n
431 431 write(2 from 2) -> (766) \r\n
432 write(436 from 436) -> (330) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
432 write(436 from 436) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
433 433 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
434 434 readline(-1) -> (27) Accept-Encoding: identity\r\n
435 435 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
436 436 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
437 437 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
438 438 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
439 439 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
440 440 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
441 441 readline(-1) -> (2) \r\n
442 442 write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
443 443 write(23 from 23) -> (271) Server: badhttpserver\r\n
444 444 write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n
445 445 write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
446 446 write(20 from 20) -> (173) Content-Length: 42\r\n
447 447 write(2 from 2) -> (171) \r\n
448 448 write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
449 449 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
450 450 readline(-1) -> (27) Accept-Encoding: identity\r\n
451 451 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
452 452 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
453 453 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
454 454 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
455 455 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
456 456 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
457 457 readline(-1) -> (2) \r\n
458 458 write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
459 459 write(23 from 23) -> (70) Server: badhttpserver\r\n
460 460 write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n
461 461 write(33 from 41) -> (0) Content-Type: application/mercuri
462 462 write limit reached; closing socket
463 463 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
464 464
465 465 $ rm -f error.log
466 466
467 467 Server sends empty HTTP body for getbundle
468 468
469 469 $ hg serve --config badserver.closeaftersendbytes=964 -p $HGPORT -d --pid-file=hg.pid -E error.log
470 470 $ cat hg.pid > $DAEMON_PIDS
471 471
472 472 $ hg clone http://localhost:$HGPORT/ clone
473 473 requesting all changes
474 474 abort: HTTP request error (incomplete response)
475 475 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
476 476 [255]
477 477
478 478 $ killdaemons.py $DAEMON_PIDS
479 479
480 480 $ cat error.log
481 481 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
482 482 readline(-1) -> (27) Accept-Encoding: identity\r\n
483 483 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
484 484 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
485 485 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
486 486 readline(-1) -> (2) \r\n
487 487 write(36 from 36) -> (928) HTTP/1.1 200 Script output follows\r\n
488 488 write(23 from 23) -> (905) Server: badhttpserver\r\n
489 489 write(37 from 37) -> (868) Date: $HTTP_DATE$\r\n
490 490 write(41 from 41) -> (827) Content-Type: application/mercurial-0.1\r\n
491 491 write(21 from 21) -> (806) Content-Length: 436\r\n
492 492 write(2 from 2) -> (804) \r\n
493 write(436 from 436) -> (368) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
493 write(436 from 436) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
494 494 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
495 495 readline(-1) -> (27) Accept-Encoding: identity\r\n
496 496 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
497 497 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
498 498 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
499 499 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
500 500 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
501 501 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
502 502 readline(-1) -> (2) \r\n
503 503 write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n
504 504 write(23 from 23) -> (309) Server: badhttpserver\r\n
505 505 write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n
506 506 write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n
507 507 write(20 from 20) -> (211) Content-Length: 42\r\n
508 508 write(2 from 2) -> (209) \r\n
509 509 write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
510 510 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
511 511 readline(-1) -> (27) Accept-Encoding: identity\r\n
512 512 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
513 513 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
514 514 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
515 515 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
516 516 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
517 517 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
518 518 readline(-1) -> (2) \r\n
519 519 write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n
520 520 write(23 from 23) -> (108) Server: badhttpserver\r\n
521 521 write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n
522 522 write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n
523 523 write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n
524 524 write(2 from 2) -> (0) \r\n
525 525 write limit reached; closing socket
526 526 write(36) -> HTTP/1.1 500 Internal Server Error\r\n
527 527
528 528 $ rm -f error.log
529 529
530 530 Server sends partial compression string
531 531
532 532 $ hg serve --config badserver.closeaftersendbytes=988 -p $HGPORT -d --pid-file=hg.pid -E error.log
533 533 $ cat hg.pid > $DAEMON_PIDS
534 534
535 535 $ hg clone http://localhost:$HGPORT/ clone
536 536 requesting all changes
537 537 abort: HTTP request error (incomplete response)
538 538 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
539 539 [255]
540 540
541 541 $ killdaemons.py $DAEMON_PIDS
542 542
543 543 $ cat error.log
544 544 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
545 545 readline(-1) -> (27) Accept-Encoding: identity\r\n
546 546 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
547 547 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
548 548 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
549 549 readline(-1) -> (2) \r\n
550 550 write(36 from 36) -> (952) HTTP/1.1 200 Script output follows\r\n
551 551 write(23 from 23) -> (929) Server: badhttpserver\r\n
552 552 write(37 from 37) -> (892) Date: $HTTP_DATE$\r\n
553 553 write(41 from 41) -> (851) Content-Type: application/mercurial-0.1\r\n
554 554 write(21 from 21) -> (830) Content-Length: 436\r\n
555 555 write(2 from 2) -> (828) \r\n
556 write(436 from 436) -> (392) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
556 write(436 from 436) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
557 557 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
558 558 readline(-1) -> (27) Accept-Encoding: identity\r\n
559 559 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
560 560 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
561 561 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
562 562 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
563 563 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
564 564 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
565 565 readline(-1) -> (2) \r\n
566 566 write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n
567 567 write(23 from 23) -> (333) Server: badhttpserver\r\n
568 568 write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n
569 569 write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n
570 570 write(20 from 20) -> (235) Content-Length: 42\r\n
571 571 write(2 from 2) -> (233) \r\n
572 572 write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
573 573 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
574 574 readline(-1) -> (27) Accept-Encoding: identity\r\n
575 575 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
576 576 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
577 577 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
578 578 readline(-1) -> (35) accept: application/mercurial-0.1\r\n
579 579 readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob)
580 580 readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n
581 581 readline(-1) -> (2) \r\n
582 582 write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n
583 583 write(23 from 23) -> (132) Server: badhttpserver\r\n
584 584 write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n
585 585 write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n
586 586 write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n
587 587 write(2 from 2) -> (24) \r\n
588 588 write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc)
589 589 write(9 from 9) -> (9) 4\r\nnone\r\n
590 590 write(9 from 9) -> (0) 4\r\nHG20\r\n
591 591 write limit reached; closing socket
592 592 write(27) -> 15\r\nInternal Server Error\r\n
593 593
594 594 $ rm -f error.log
595 595
596 596 Server sends partial bundle2 header magic
597 597
598 598 $ hg serve --config badserver.closeaftersendbytes=985 -p $HGPORT -d --pid-file=hg.pid -E error.log
599 599 $ cat hg.pid > $DAEMON_PIDS
600 600
601 601 $ hg clone http://localhost:$HGPORT/ clone
602 602 requesting all changes
603 603 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
604 604 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
605 605 [255]
606 606
607 607 $ killdaemons.py $DAEMON_PIDS
608 608
609 609 $ tail -7 error.log
610 610 write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n
611 611 write(2 from 2) -> (21) \r\n
612 612 write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc)
613 613 write(9 from 9) -> (6) 4\r\nnone\r\n
614 614 write(6 from 9) -> (0) 4\r\nHG2
615 615 write limit reached; closing socket
616 616 write(27) -> 15\r\nInternal Server Error\r\n
617 617
618 618 $ rm -f error.log
619 619
620 620 Server sends incomplete bundle2 stream params length
621 621
622 622 $ hg serve --config badserver.closeaftersendbytes=994 -p $HGPORT -d --pid-file=hg.pid -E error.log
623 623 $ cat hg.pid > $DAEMON_PIDS
624 624
625 625 $ hg clone http://localhost:$HGPORT/ clone
626 626 requesting all changes
627 627 abort: HTTP request error (incomplete response; expected 1 bytes got 3)
628 628 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
629 629 [255]
630 630
631 631 $ killdaemons.py $DAEMON_PIDS
632 632
633 633 $ tail -8 error.log
634 634 write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n
635 635 write(2 from 2) -> (30) \r\n
636 636 write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc)
637 637 write(9 from 9) -> (15) 4\r\nnone\r\n
638 638 write(9 from 9) -> (6) 4\r\nHG20\r\n
639 639 write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
640 640 write limit reached; closing socket
641 641 write(27) -> 15\r\nInternal Server Error\r\n
642 642
643 643 $ rm -f error.log
644 644
645 645 Servers stops after bundle2 stream params header
646 646
647 647 $ hg serve --config badserver.closeaftersendbytes=997 -p $HGPORT -d --pid-file=hg.pid -E error.log
648 648 $ cat hg.pid > $DAEMON_PIDS
649 649
650 650 $ hg clone http://localhost:$HGPORT/ clone
651 651 requesting all changes
652 652 abort: HTTP request error (incomplete response)
653 653 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
654 654 [255]
655 655
656 656 $ killdaemons.py $DAEMON_PIDS
657 657
658 658 $ tail -8 error.log
659 659 write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n
660 660 write(2 from 2) -> (33) \r\n
661 661 write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc)
662 662 write(9 from 9) -> (18) 4\r\nnone\r\n
663 663 write(9 from 9) -> (9) 4\r\nHG20\r\n
664 664 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
665 665 write limit reached; closing socket
666 666 write(27) -> 15\r\nInternal Server Error\r\n
667 667
668 668 $ rm -f error.log
669 669
670 670 Server stops sending after bundle2 part header length
671 671
672 672 $ hg serve --config badserver.closeaftersendbytes=1006 -p $HGPORT -d --pid-file=hg.pid -E error.log
673 673 $ cat hg.pid > $DAEMON_PIDS
674 674
675 675 $ hg clone http://localhost:$HGPORT/ clone
676 676 requesting all changes
677 677 abort: HTTP request error (incomplete response)
678 678 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
679 679 [255]
680 680
681 681 $ killdaemons.py $DAEMON_PIDS
682 682
683 683 $ tail -9 error.log
684 684 write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n
685 685 write(2 from 2) -> (42) \r\n
686 686 write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc)
687 687 write(9 from 9) -> (27) 4\r\nnone\r\n
688 688 write(9 from 9) -> (18) 4\r\nHG20\r\n
689 689 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
690 690 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
691 691 write limit reached; closing socket
692 692 write(27) -> 15\r\nInternal Server Error\r\n
693 693
694 694 $ rm -f error.log
695 695
696 696 Server stops sending after bundle2 part header
697 697
698 698 $ hg serve --config badserver.closeaftersendbytes=1053 -p $HGPORT -d --pid-file=hg.pid -E error.log
699 699 $ cat hg.pid > $DAEMON_PIDS
700 700
701 701 $ hg clone http://localhost:$HGPORT/ clone
702 702 requesting all changes
703 703 adding changesets
704 704 transaction abort!
705 705 rollback completed
706 706 abort: HTTP request error (incomplete response)
707 707 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
708 708 [255]
709 709
710 710 $ killdaemons.py $DAEMON_PIDS
711 711
712 712 $ tail -10 error.log
713 713 write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n
714 714 write(2 from 2) -> (89) \r\n
715 715 write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc)
716 716 write(9 from 9) -> (74) 4\r\nnone\r\n
717 717 write(9 from 9) -> (65) 4\r\nHG20\r\n
718 718 write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
719 719 write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
720 720 write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
721 721 write limit reached; closing socket
722 722 write(27) -> 15\r\nInternal Server Error\r\n
723 723
724 724 $ rm -f error.log
725 725
726 726 Server stops after bundle2 part payload chunk size
727 727
728 728 $ hg serve --config badserver.closeaftersendbytes=1074 -p $HGPORT -d --pid-file=hg.pid -E error.log
729 729 $ cat hg.pid > $DAEMON_PIDS
730 730
731 731 $ hg clone http://localhost:$HGPORT/ clone
732 732 requesting all changes
733 733 adding changesets
734 734 transaction abort!
735 735 rollback completed
736 736 abort: HTTP request error (incomplete response; expected 459 bytes got 7)
737 737 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
738 738 [255]
739 739
740 740 $ killdaemons.py $DAEMON_PIDS
741 741
742 742 $ tail -11 error.log
743 743 write(2 from 2) -> (110) \r\n
744 744 write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc)
745 745 write(9 from 9) -> (95) 4\r\nnone\r\n
746 746 write(9 from 9) -> (86) 4\r\nHG20\r\n
747 747 write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
748 748 write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
749 749 write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
750 750 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
751 751 write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc)
752 752 write limit reached; closing socket
753 753 write(27) -> 15\r\nInternal Server Error\r\n
754 754
755 755 $ rm -f error.log
756 756
757 757 Server stops sending in middle of bundle2 payload chunk
758 758
759 759 $ hg serve --config badserver.closeaftersendbytes=1535 -p $HGPORT -d --pid-file=hg.pid -E error.log
760 760 $ cat hg.pid > $DAEMON_PIDS
761 761
762 762 $ hg clone http://localhost:$HGPORT/ clone
763 763 requesting all changes
764 764 adding changesets
765 765 transaction abort!
766 766 rollback completed
767 767 abort: HTTP request error (incomplete response)
768 768 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
769 769 [255]
770 770
771 771 $ killdaemons.py $DAEMON_PIDS
772 772
773 773 $ tail -12 error.log
774 774 write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n
775 775 write(2 from 2) -> (571) \r\n
776 776 write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc)
777 777 write(9 from 9) -> (556) 4\r\nnone\r\n
778 778 write(9 from 9) -> (547) 4\r\nHG20\r\n
779 779 write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
780 780 write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
781 781 write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
782 782 write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
783 783 write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
784 784 write limit reached; closing socket
785 785 write(27) -> 15\r\nInternal Server Error\r\n
786 786
787 787 $ rm -f error.log
788 788
789 789 Server stops sending after 0 length payload chunk size
790 790
791 791 $ hg serve --config badserver.closeaftersendbytes=1566 -p $HGPORT -d --pid-file=hg.pid -E error.log
792 792 $ cat hg.pid > $DAEMON_PIDS
793 793
794 794 $ hg clone http://localhost:$HGPORT/ clone
795 795 requesting all changes
796 796 adding changesets
797 797 adding manifests
798 798 adding file changes
799 799 added 1 changesets with 1 changes to 1 files
800 800 transaction abort!
801 801 rollback completed
802 802 abort: HTTP request error (incomplete response; expected 23 bytes got 9)
803 803 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
804 804 [255]
805 805
806 806 $ killdaemons.py $DAEMON_PIDS
807 807
808 808 $ tail -13 error.log
809 809 write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc)
810 810 write(9 from 9) -> (587) 4\r\nnone\r\n
811 811 write(9 from 9) -> (578) 4\r\nHG20\r\n
812 812 write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
813 813 write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
814 814 write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
815 815 write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
816 816 write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
817 817 write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
818 818 write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
819 819 write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
820 820 write limit reached; closing socket
821 821 write(27) -> 15\r\nInternal Server Error\r\n
822 822
823 823 $ rm -f error.log
824 824
825 825 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
826 826 This is before the 0 size chunked transfer part that signals end of HTTP response.
827 827
828 828 # $ hg serve --config badserver.closeaftersendbytes=1741 -p $HGPORT -d --pid-file=hg.pid -E error.log
829 829 $ hg serve --config badserver.closeaftersendbytes=1848 -p $HGPORT -d --pid-file=hg.pid -E error.log
830 830 $ cat hg.pid > $DAEMON_PIDS
831 831
832 832 $ hg clone http://localhost:$HGPORT/ clone
833 833 requesting all changes
834 834 adding changesets
835 835 adding manifests
836 836 adding file changes
837 837 added 1 changesets with 1 changes to 1 files
838 838 new changesets 96ee1d7354c4
839 839 updating to branch default
840 840 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
841 841
842 842 $ killdaemons.py $DAEMON_PIDS
843 843
844 844 $ tail -22 error.log
845 845 write(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
846 846 write(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
847 847 write(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
848 848 write(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
849 849 write(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
850 850 write(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
851 851 write(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
852 852 write(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
853 853 write(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
854 854 write(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
855 855 write(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
856 856 write(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
857 857 write(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
858 858 write(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
859 859 write(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
860 860 write(35 from 35) -> (72) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc)
861 861 write(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
862 862 write(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
863 863 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
864 864 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
865 865 write limit reached; closing socket
866 866 write(27) -> 15\r\nInternal Server Error\r\n
867 867
868 868 $ rm -f error.log
869 869 $ rm -rf clone
870 870
871 871 Server sends a size 0 chunked-transfer size without terminating \r\n
872 872
873 873 $ hg serve --config badserver.closeaftersendbytes=1851 -p $HGPORT -d --pid-file=hg.pid -E error.log
874 874 $ cat hg.pid > $DAEMON_PIDS
875 875
876 876 $ hg clone http://localhost:$HGPORT/ clone
877 877 requesting all changes
878 878 adding changesets
879 879 adding manifests
880 880 adding file changes
881 881 added 1 changesets with 1 changes to 1 files
882 882 new changesets 96ee1d7354c4
883 883 updating to branch default
884 884 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
885 885
886 886 $ killdaemons.py $DAEMON_PIDS
887 887
888 888 $ tail -23 error.log
889 889 write(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
890 890 write(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
891 891 write(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
892 892 write(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
893 893 write(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
894 894 write(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
895 895 write(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
896 896 write(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
897 897 write(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
898 898 write(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
899 899 write(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
900 900 write(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
901 901 write(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
902 902 write(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
903 903 write(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
904 904 write(35 from 35) -> (75) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc)
905 905 write(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
906 906 write(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
907 907 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
908 908 write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
909 909 write(3 from 5) -> (0) 0\r\n
910 910 write limit reached; closing socket
911 911 write(27) -> 15\r\nInternal Server Error\r\n
912 912
913 913 $ rm -f error.log
914 914 $ rm -rf clone
General Comments 0
You need to be logged in to leave comments. Login now