##// END OF EJS Templates
tests: add a substitution pattern for dates in HTTP headers and LFS payload...
Matt Harbison -
r36942:03368431 default
parent child Browse files
Show More
@@ -1,164 +1,172
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'stream%253Dv2',
26 26 # (the replacement patterns)
27 27 br'$USUAL_BUNDLE_CAPS$'
28 28 ),
29 29 (br'bundlecaps=HG20%2Cbundle2%3DHG20%250A'
30 30 br'bookmarks%250A'
31 31 br'changegroup%253D01%252C02%250A'
32 32 br'digests%253Dmd5%252Csha1%252Csha512%250A'
33 33 br'error%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250A'
34 34 br'hgtagsfnodes%250A'
35 35 br'listkeys%250A'
36 36 br'phases%253Dheads%250A'
37 37 br'pushkey%250A'
38 38 br'remote-changegroup%253Dhttp%252Chttps',
39 39 # (the replacement patterns)
40 40 br'$USUAL_BUNDLE_CAPS_SERVER$'
41 41 ),
42 42 # bundle2 capabilities sent through ssh
43 43 (br'bundle2=HG20%0A'
44 44 br'bookmarks%0A'
45 45 br'changegroup%3D01%2C02%0A'
46 46 br'digests%3Dmd5%2Csha1%2Csha512%0A'
47 47 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
48 48 br'hgtagsfnodes%0A'
49 49 br'listkeys%0A'
50 50 br'phases%3Dheads%0A'
51 51 br'pushkey%0A'
52 52 br'remote-changegroup%3Dhttp%2Chttps%0A'
53 53 br'stream%3Dv2',
54 54 # (replacement patterns)
55 55 br'$USUAL_BUNDLE2_CAPS$'
56 56 ),
57 57 # bundle2 capabilities advertised by the server
58 58 (br'bundle2=HG20%0A'
59 59 br'bookmarks%0A'
60 60 br'changegroup%3D01%2C02%0A'
61 61 br'digests%3Dmd5%2Csha1%2Csha512%0A'
62 62 br'error%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0A'
63 63 br'hgtagsfnodes%0A'
64 64 br'listkeys%0A'
65 65 br'phases%3Dheads%0A'
66 66 br'pushkey%0A'
67 67 br'remote-changegroup%3Dhttp%2Chttps',
68 68 # (replacement patterns)
69 69 br'$USUAL_BUNDLE2_CAPS_SERVER$'
70 70 ),
71 71 # HTTP log dates
72 72 (br' - - \[\d\d/.../2\d\d\d \d\d:\d\d:\d\d] "(GET|PUT|POST)',
73 73 lambda m: br' - - [$LOGDATE$] "' + m.group(1)
74 74 ),
75 # HTTP header dates- RFC 1123
76 (br'Date: [A-Za-z]{3}, \d\d [A-Za-z]{3} \d{4} \d\d:\d\d:\d\d GMT',
77 br'Date: $HTTP_DATE$'
78 ),
79 # LFS expiration value
80 (br'"expires_at": "\d{4}-\d\d-\d\dT\d\d:\d\d:\d\dZ"',
81 br'"expires_at": "$ISO_8601_DATE_TIME$"'
82 ),
75 83 # Windows has an extra '/' in the following lines that get globbed away:
76 84 # pushing to file:/*/$TESTTMP/r2 (glob)
77 85 # comparing with file:/*/$TESTTMP/r2 (glob)
78 86 # sub/maybelarge.dat: largefile 34..9c not available from
79 87 # file:/*/$TESTTMP/largefiles-repo (glob)
80 88 (br'(.*file:/)/?(/\$TESTTMP.*)',
81 89 lambda m: m.group(1) + b'*' + m.group(2) + b' (glob)'
82 90 ),
83 91 ]
84 92
85 93 # Various platform error strings, keyed on a common replacement string
86 94 _errors = {
87 95 br'$ENOENT$': (
88 96 # strerror()
89 97 br'No such file or directory',
90 98
91 99 # FormatMessage(ERROR_FILE_NOT_FOUND)
92 100 br'The system cannot find the file specified',
93 101 ),
94 102 br'$ENOTDIR$': (
95 103 # strerror()
96 104 br'Not a directory',
97 105
98 106 # FormatMessage(ERROR_PATH_NOT_FOUND)
99 107 br'The system cannot find the path specified',
100 108 ),
101 109 br'$ECONNRESET$': (
102 110 # strerror()
103 111 br'Connection reset by peer',
104 112
105 113 # FormatMessage(WSAECONNRESET)
106 114 br'An existing connection was forcibly closed by the remote host',
107 115 ),
108 116 br'$EADDRINUSE$': (
109 117 # strerror()
110 118 br'Address already in use',
111 119
112 120 # FormatMessage(WSAEADDRINUSE)
113 121 br'Only one usage of each socket address'
114 122 br' \(protocol/network address/port\) is normally permitted',
115 123 ),
116 124 }
117 125
118 126 for replace, msgs in _errors.items():
119 127 substitutions.extend((m, replace) for m in msgs)
120 128
121 129 # Output lines on Windows that can be autocorrected for '\' vs '/' path
122 130 # differences.
123 131 _winpathfixes = [
124 132 # cloning subrepo s\ss from $TESTTMP/t/s/ss
125 133 # cloning subrepo foo\bar from http://localhost:$HGPORT/foo/bar
126 134 br'(?m)^cloning subrepo \S+\\.*',
127 135
128 136 # pulling from $TESTTMP\issue1852a
129 137 br'(?m)^pulling from \$TESTTMP\\.*',
130 138
131 139 # pushing to $TESTTMP\a
132 140 br'(?m)^pushing to \$TESTTMP\\.*',
133 141
134 142 # pushing subrepo s\ss to $TESTTMP/t/s/ss
135 143 br'(?m)^pushing subrepo \S+\\\S+ to.*',
136 144
137 145 # moving d1\d11\a1 to d3/d11/a1
138 146 br'(?m)^moving \S+\\.*',
139 147
140 148 # d1\a: not recording move - dummy does not exist
141 149 br'\S+\\\S+: not recording move .+',
142 150
143 151 # reverting s\a
144 152 br'(?m)^reverting (?!subrepo ).*\\.*',
145 153
146 154 # saved backup bundle to
147 155 # $TESTTMP\test\.hg\strip-backup/443431ffac4f-2fc5398a-backup.hg
148 156 br'(?m)^saved backup bundle to \$TESTTMP.*\.hg',
149 157
150 158 # no changes made to subrepo s\ss since last push to ../tcc/s/ss
151 159 br'(?m)^no changes made to subrepo \S+\\\S+ since.*',
152 160
153 161 # changeset 5:9cc5aa7204f0: stuff/maybelarge.dat references missing
154 162 # $TESTTMP\largefiles-repo-hg\.hg\largefiles\76..38
155 163 br'(?m)^changeset .* references (corrupted|missing) \$TESTTMP\\.*',
156 164
157 165 # stuff/maybelarge.dat: largefile 76..38 not available from
158 166 # file:/*/$TESTTMP\largefiles-repo (glob)
159 167 br'.*: largefile \S+ not available from file:/\*/.+',
160 168 ]
161 169
162 170 if os.name == 'nt':
163 171 substitutions.extend([(s, lambda match: match.group().replace(b'\\', b'/'))
164 172 for s in _winpathfixes])
@@ -1,913 +1,913
1 1 #require killdaemons 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 -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) -> (2?) host: localhost:$HGPORT\r\n (glob)
115 115 readline(9? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
116 116 readline(4? 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 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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: 417\r\n
122 122 write(2) -> \r\n
123 123 write(417) -> lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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(210 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
128 128 readline(184 from -1) -> (27) Accept-Encoding: identity\r\n
129 129 readline(157 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
130 130 readline(128 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
131 131 readline(87 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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=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(304 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
153 153 readline(271 from -1) -> (27) Accept-Encoding: identity\r\n
154 154 readline(244 from -1) -> (35) accept: application/mercurial-0.1\r\n
155 155 readline(209 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
156 156 readline(18? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
157 157 readline(13? 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 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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: 417\r\n
163 163 write(2) -> \r\n
164 164 write(417) -> lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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(304 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
172 172 readline(278 from -1) -> (27) Accept-Encoding: identity\r\n
173 173 readline(251 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
174 174 readline(222 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
175 175 readline(181 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
176 176 readline(133 from -1) -> (35) accept: application/mercurial-0.1\r\n
177 177 readline(98 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
178 178 readline(7? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
179 179 readline(2? 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 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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(2? from 65537) -> (2?) 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=315 -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(315 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
210 210 readline(282 from -1) -> (27) Accept-Encoding: identity\r\n
211 211 readline(255 from -1) -> (35) accept: application/mercurial-0.1\r\n
212 212 readline(220 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
213 213 readline(19? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
214 214 readline(14? 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 write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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: 430\r\n
220 220 write(2) -> \r\n
221 221 write(430) -> lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httppostargs httpmediatype=0.1rx,0.1tx,0.2tx compression=none
222 222 readline\(14[67] from 65537\) -> \(2[67]\) POST /\?cmd=batch HTTP/1.1\\r\\n (re)
223 223 readline\(1(19|20) from -1\) -> \(27\) Accept-Encoding: identity\\r\\n (re)
224 224 readline(9? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob)
225 225 readline(5? from -1) -> (19) vary: 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(315 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
230 230 readline(288 from -1) -> (27) Accept-Encoding: identity\r\n
231 231 readline(261 from -1) -> (41) content-type: application/mercurial-0.1\r\n
232 232 readline(220 from -1) -> (19) vary: X-HgProto-1\r\n
233 233 readline(201 from -1) -> (19) x-hgargs-post: 28\r\n
234 234 readline(182 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\r\n
235 235 readline(134 from -1) -> (35) accept: application/mercurial-0.1\r\n
236 236 readline(99 from -1) -> (20) content-length: 28\r\n
237 237 readline(79 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
238 238 readline(5? 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 397 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 write(37 from 37) -> (84) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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: 417\r\n
296 296 write(2 from 2) -> (20) \r\n
297 297 write(20 from 417) -> (0) lookup branchmap pus
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=695 -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) -> (659) HTTP/1.1 200 Script output follows\r\n
327 327 write(23 from 23) -> (636) Server: badhttpserver\r\n
328 write(37 from 37) -> (599) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
328 write(37 from 37) -> (599) Date: $HTTP_DATE$\r\n
329 329 write(41 from 41) -> (558) Content-Type: application/mercurial-0.1\r\n
330 330 write(21 from 21) -> (537) Content-Length: 417\r\n
331 331 write(2 from 2) -> (535) \r\n
332 332 write(417 from 417) -> (118) lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (22) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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=760 -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) -> (724) HTTP/1.1 200 Script output follows\r\n
375 375 write(23 from 23) -> (701) Server: badhttpserver\r\n
376 write(37 from 37) -> (664) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
376 write(37 from 37) -> (664) Date: $HTTP_DATE$\r\n
377 377 write(41 from 41) -> (623) Content-Type: application/mercurial-0.1\r\n
378 378 write(21 from 21) -> (602) Content-Length: 417\r\n
379 379 write(2 from 2) -> (600) \r\n
380 380 write(417 from 417) -> (183) lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (87) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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=907 -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) -> (871) HTTP/1.1 200 Script output follows\r\n
427 427 write(23 from 23) -> (848) Server: badhttpserver\r\n
428 write(37 from 37) -> (811) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
428 write(37 from 37) -> (811) Date: $HTTP_DATE$\r\n
429 429 write(41 from 41) -> (770) Content-Type: application/mercurial-0.1\r\n
430 430 write(21 from 21) -> (749) Content-Length: 417\r\n
431 431 write(2 from 2) -> (747) \r\n
432 432 write(417 from 417) -> (330) lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (234) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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) -> (440) 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%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
453 453 readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (33) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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=945 -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) -> (909) HTTP/1.1 200 Script output follows\r\n
488 488 write(23 from 23) -> (886) Server: badhttpserver\r\n
489 write(37 from 37) -> (849) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
489 write(37 from 37) -> (849) Date: $HTTP_DATE$\r\n
490 490 write(41 from 41) -> (808) Content-Type: application/mercurial-0.1\r\n
491 491 write(21 from 21) -> (787) Content-Length: 417\r\n
492 492 write(2 from 2) -> (785) \r\n
493 493 write(417 from 417) -> (368) lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (272) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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) -> (440) 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%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
514 514 readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (71) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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=969 -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) -> (933) HTTP/1.1 200 Script output follows\r\n
551 551 write(23 from 23) -> (910) Server: badhttpserver\r\n
552 write(37 from 37) -> (873) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
552 write(37 from 37) -> (873) Date: $HTTP_DATE$\r\n
553 553 write(41 from 41) -> (832) Content-Type: application/mercurial-0.1\r\n
554 554 write(21 from 21) -> (811) Content-Length: 417\r\n
555 555 write(2 from 2) -> (809) \r\n
556 556 write(417 from 417) -> (392) lookup branchmap pushkey known getbundle unbundlehash batch changegroupsubset streamreqs=generaldelta,revlogv1 bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none
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) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (296) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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) -> (440) 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%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
577 577 readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$\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 write(37 from 37) -> (95) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n
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=966 -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=975 -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=978 -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=987 -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=1034 -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=1055 -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=1516 -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=1547 -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=1722 -p $HGPORT -d --pid-file=hg.pid -E error.log
829 829 $ cat hg.pid > $DAEMON_PIDS
830 830
831 831 $ hg clone http://localhost:$HGPORT/ clone
832 832 requesting all changes
833 833 adding changesets
834 834 adding manifests
835 835 adding file changes
836 836 added 1 changesets with 1 changes to 1 files
837 837 new changesets 96ee1d7354c4
838 838 updating to branch default
839 839 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
840 840
841 841 $ killdaemons.py $DAEMON_PIDS
842 842
843 843 $ tail -22 error.log
844 844 write(28 from 28) -> (779) Transfer-Encoding: chunked\r\n
845 845 write(2 from 2) -> (777) \r\n
846 846 write(6 from 6) -> (771) 1\\r\\n\x04\\r\\n (esc)
847 847 write(9 from 9) -> (762) 4\r\nnone\r\n
848 848 write(9 from 9) -> (753) 4\r\nHG20\r\n
849 849 write(9 from 9) -> (744) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
850 850 write(9 from 9) -> (735) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
851 851 write(47 from 47) -> (688) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
852 852 write(9 from 9) -> (679) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
853 853 write(473 from 473) -> (206) 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)
854 854 write(9 from 9) -> (197) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
855 855 write(9 from 9) -> (188) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
856 856 write(38 from 38) -> (150) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
857 857 write(9 from 9) -> (141) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
858 858 write(64 from 64) -> (77) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
859 859 write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
860 860 write(9 from 9) -> (59) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
861 861 write(41 from 41) -> (18) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
862 862 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
863 863 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
864 864 write limit reached; closing socket
865 865 write(27) -> 15\r\nInternal Server Error\r\n
866 866
867 867 $ rm -f error.log
868 868 $ rm -rf clone
869 869
870 870 Server sends a size 0 chunked-transfer size without terminating \r\n
871 871
872 872 $ hg serve --config badserver.closeaftersendbytes=1725 -p $HGPORT -d --pid-file=hg.pid -E error.log
873 873 $ cat hg.pid > $DAEMON_PIDS
874 874
875 875 $ hg clone http://localhost:$HGPORT/ clone
876 876 requesting all changes
877 877 adding changesets
878 878 adding manifests
879 879 adding file changes
880 880 added 1 changesets with 1 changes to 1 files
881 881 new changesets 96ee1d7354c4
882 882 updating to branch default
883 883 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
884 884
885 885 $ killdaemons.py $DAEMON_PIDS
886 886
887 887 $ tail -23 error.log
888 888 write(28 from 28) -> (782) Transfer-Encoding: chunked\r\n
889 889 write(2 from 2) -> (780) \r\n
890 890 write(6 from 6) -> (774) 1\\r\\n\x04\\r\\n (esc)
891 891 write(9 from 9) -> (765) 4\r\nnone\r\n
892 892 write(9 from 9) -> (756) 4\r\nHG20\r\n
893 893 write(9 from 9) -> (747) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
894 894 write(9 from 9) -> (738) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
895 895 write(47 from 47) -> (691) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
896 896 write(9 from 9) -> (682) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
897 897 write(473 from 473) -> (209) 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)
898 898 write(9 from 9) -> (200) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
899 899 write(9 from 9) -> (191) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
900 900 write(38 from 38) -> (153) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
901 901 write(9 from 9) -> (144) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
902 902 write(64 from 64) -> (80) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
903 903 write(9 from 9) -> (71) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
904 904 write(9 from 9) -> (62) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
905 905 write(41 from 41) -> (21) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
906 906 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
907 907 write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
908 908 write(3 from 5) -> (0) 0\r\n
909 909 write limit reached; closing socket
910 910 write(27) -> 15\r\nInternal Server Error\r\n
911 911
912 912 $ rm -f error.log
913 913 $ rm -rf clone
General Comments 0
You need to be logged in to leave comments. Login now