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