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