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