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