annotate tests/test-http-bad-server.t @ 42920:a50661567f83

uncommit: drop the hyphen from --current-user and --current-date I didn't pay enough attention to these long forms- graft, amend and MQ already use the old style naming. It's probably more important to be consistent than modern. The hypenated style came from evolve. Yuya mentioned this naming discrepancy in 4145fd3569c3, but it didn't attract any discussion[1]. There's also a bit of inconsistency in that the default parameter for `currentdate` is `False` for graft, and `None` for the rest. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-January/126767.html Differential Revision: https://phab.mercurial-scm.org/D6841
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 10 Sep 2019 22:04:22 -0400
parents d7304434390f
children edc8504bc26b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37845
b4b7427b5786 tests: remove #require killdaemons
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37556
diff changeset
1 #require serve zstd
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
3 Client version is embedded in HTTP request and is effectively dynamic. Pin the
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
4 version so behavior is deterministic.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
5
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
6 $ cat > fakeversion.py << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7 > from mercurial import util
40982
c296b8faa926 py3: byteify the fakeversion extension in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 40973
diff changeset
8 > util.version = lambda: b'4.2'
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9 > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 $ cat >> $HGRCPATH << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
12 > [extensions]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
13 > fakeversion = `pwd`/fakeversion.py
40886
8aa7879adacf test: explicitly disable sparse-revlog in test-http-bad-server.t
Boris Feld <boris.feld@octobus.net>
parents: 40881
diff changeset
14 > [format]
8aa7879adacf test: explicitly disable sparse-revlog in test-http-bad-server.t
Boris Feld <boris.feld@octobus.net>
parents: 40881
diff changeset
15 > sparse-revlog = no
34322
10e162bb9bf5 pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents: 34308
diff changeset
16 > [devel]
10e162bb9bf5 pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents: 34308
diff changeset
17 > legacy.exchange = phases
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
18 > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
19
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
20 $ hg init server0
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
21 $ cd server0
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
22 $ touch foo
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
23 $ hg -q commit -A -m initial
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
24
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
25 Also disable compression because zstd is optional and causes output to vary
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
26 and because debugging partial responses is hard when compression is involved
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
27
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
28 $ cat > .hg/hgrc << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
29 > [extensions]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
30 > badserver = $TESTDIR/badserverext.py
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
31 > [server]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
32 > compressionengines = none
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
33 > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
34
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
35 Failure to accept() socket should result in connection related error message
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
36
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
37 $ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
38 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
39
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
40 $ hg clone http://localhost:$HGPORT/ clone
40973
97484e1d1834 tests: followup on network related errors on Debian 9
Boris Feld <boris.feld@octobus.net>
parents: 40936
diff changeset
41 abort: error: (\$ECONNRESET\$|\$EADDRNOTAVAIL\$) (re)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
42 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
43
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
44 (The server exits on its own, but there is a race between that and starting a new server.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
45 So ensure the process is dead.)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
46
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
47 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
48
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
49 Failure immediately after accept() should yield connection related error message
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
50
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
51 $ hg serve --config badserver.closeafteraccept=true -p $HGPORT -d --pid-file=hg.pid
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
52 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
53
32064
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
54 TODO: this usually outputs good results, but sometimes emits abort:
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
55 error: '' on FreeBSD and OS X.
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
56 What we ideally want are:
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
57
35232
a037b6647d8c tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 35074
diff changeset
58 abort: error: $ECONNRESET$
32064
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
59
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
60 The flakiness in this output was observable easily with
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
61 --runs-per-test=20 on macOS 10.12 during the freeze for 4.2.
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
62 $ hg clone http://localhost:$HGPORT/ clone
32064
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
63 abort: error: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
64 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
65
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
66 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
67
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
68 Failure to read all bytes in initial HTTP request should yield connection related error message
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
69
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
70 $ hg serve --config badserver.closeafterrecvbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
71 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
72
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
73 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
74 abort: error: bad HTTP status line: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
75 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
76
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
77 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
78
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
79 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
80 readline(1 from 65537) -> (1) G
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
81 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
82
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
83 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
84
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
85 Same failure, but server reads full HTTP request line
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
86
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
87 $ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
88 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
89 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
90 abort: error: bad HTTP status line: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
91 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
92
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
93 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
94
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
95 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
96 readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
97 readline(7 from *) -> (7) Accept- (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
98 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
99
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
100 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
101
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
102 Failure on subsequent HTTP request on the same socket (cmd?batch)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37555
diff changeset
104 $ hg serve --config badserver.closeafterrecvbytes=210,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
105 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
106 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
107 abort: error: bad HTTP status line: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
108 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
109
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
110 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
111
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
112 $ cat error.log
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37555
diff changeset
113 readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
114 readline(177 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
115 readline(150 from *) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
116 readline(115 from *) -> (*) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
117 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
118 readline(* from *) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
119 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: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
120 sendall(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
121 write(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: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
122 write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
123 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
124 write(23) -> Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
125 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
126 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
127 write(21) -> Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
128 write(2) -> \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
129 write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
32319
d3177aecac01 test-http-bad-server: match different in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32282
diff changeset
130 readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
131 readline(1? from *) -> (1?) Accept-Encoding* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
132 read limit reached; closing socket
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
133 readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
134 readline(197 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
135 readline(170 from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
136 readline(141 from *) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
137 readline(100 from *) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
138 readline(39 from *) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
139 readline(4 from *) -> (4) host (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
140 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
141
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
142 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
143
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
144 Failure to read getbundle HTTP request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
145
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37555
diff changeset
146 $ hg serve --config badserver.closeafterrecvbytes=308,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
147 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
148 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
149 requesting all changes
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
150 abort: error: bad HTTP status line: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
151 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
152
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
153 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
154
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
155 $ cat error.log
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
156 readline(1 from -1) -> (1) x (?)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
157 readline(1 from -1) -> (1) x (?)
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37555
diff changeset
158 readline(308 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
159 readline(275 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
160 readline(248 from *) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
161 readline(213 from *) -> (*) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
162 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
163 readline(* from *) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
164 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: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
165 sendall(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
166 write(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: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
167 write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
168 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
169 write(23) -> Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
170 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
171 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
172 write(21) -> Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
173 write(2) -> \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
174 write(450) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
175 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
176 readline(1?? from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
177 readline(8? from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
178 readline(5? from *) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
179 readline(1? from *) -> (1?) x-hgproto-1:* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
180 read limit reached; closing socket
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
181 readline(317 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
182 readline(291 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
183 readline(264 from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
184 readline(235 from *) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
185 readline(194 from *) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
186 readline(133 from *) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
187 readline(98 from *) -> (*) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
188 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
189 readline(* from *) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
191 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
192 write(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 (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
193 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
194 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
195 write(23) -> Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
196 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
197 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
198 write(20) -> Content-Length: 42\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
199 write(2) -> \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
200 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
201 readline(* from 65537) -> (*) GET /?cmd=getbundle HTTP* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
202 read limit reached; closing socket
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
203 readline(304 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
204 readline(274 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
205 readline(247 from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
206 readline(218 from *) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
207 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
208
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
209 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
210
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
211 Now do a variation using POST to send arguments
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
212
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37555
diff changeset
213 $ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
214 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
215
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
216 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
217 abort: error: bad HTTP status line: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
218 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
219
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
220 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
221
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
222 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
37556
b77aa48ba690 httppeer: only advertise partial-pull if capabilities are known
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37555
diff changeset
223 readline(329 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
224 readline(296 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
225 readline(269 from *) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
226 readline(234 from *) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
227 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
228 readline(* from *) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
229 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: 463\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
230 sendall(463) -> 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=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
231 write(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: 463\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
232 write(463) -> 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=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
233 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
234 write(23) -> Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
235 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
236 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
237 write(21) -> Content-Length: 463\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
238 write(2) -> \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
239 write(463) -> 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=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
37555
930c433eb311 httppeer: always add x-hg* headers to Vary header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
240 readline(1?? from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
241 readline(1?? from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
242 readline(1?? from *) -> (41) content-type: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
243 readline(6? from *) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
244 readline(3? from *) -> (19) x-hgargs-post: 28\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
245 readline(1? from *) -> (1?) x-hgproto-1: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
246 read limit reached; closing socket
37555
930c433eb311 httppeer: always add x-hg* headers to Vary header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37498
diff changeset
247 readline(344 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
248 readline(317 from *) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
249 readline(290 from *) -> (41) content-type: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
250 readline(249 from *) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
251 readline(216 from *) -> (19) x-hgargs-post: 28\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
252 readline(197 from *) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
253 readline(136 from *) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
254 readline(101 from *) -> (20) content-length: 28\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
255 readline(81 from *) -> (*) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
256 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
257 readline(* from *) -> (2) \r\n (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
258 read(* from 28) -> (*) cmds=* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
259 read limit reached, closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
260 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
261 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
262 Exception: connection closed after receiving N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
263
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
264 write(126) -> HTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
265 write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
266
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
267 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
268
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
269 Now move on to partial server responses
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
270
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
271 Server sends a single character from the HTTP response line
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
272
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
273 $ hg serve --config badserver.closeaftersendbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
274 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
275
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
276 $ hg clone http://localhost:$HGPORT/ clone
34308
9bd003052d55 keepalive: add more context to bad status line errors
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32319
diff changeset
277 abort: error: bad HTTP status line: H
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
278 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
279
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
280 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
281
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
282 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
283 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
284 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
285 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
286 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
287 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
288 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
289 sendall(1 from 160) -> (0) H (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
290 write(1 from 160) -> (0) H (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
291 write(1 from 36) -> (0) H (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
292 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
293 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
294 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
295 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
296
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
297 write(286) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
298 write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
299
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
300 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
301
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
302 Server sends an incomplete capabilities response body
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
303
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
304 $ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
305 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
306
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
307 $ hg clone http://localhost:$HGPORT/ clone
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
308 abort: HTTP request error (incomplete response; expected 450 bytes got 20)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
309 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
310 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
311
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
312 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
313
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
314 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
315 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
316 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
317 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
318 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
319 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
320 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
321 sendall(160 from 160) -> (20) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
322 sendall(20 from 450) -> (0) batch branchmap bund (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
323 write(160 from 160) -> (20) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
324 write(20 from 450) -> (0) batch branchmap bund (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
325 write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
326 write(23 from 23) -> (121) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
327 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
328 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
329 write(21 from 21) -> (22) Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
330 write(2 from 2) -> (20) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
331 write(20 from 450) -> (0) batch branchmap bund (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
332 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
333 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
334 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
335 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
336
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
337
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
338 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
339
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
340 Server sends incomplete headers for batch request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
341
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
342 $ hg serve --config badserver.closeaftersendbytes=728 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
343 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
344
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
345 TODO this output is horrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
346
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
347 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
348 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
349 ---%<--- (applicat)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
350
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
351 ---%<---
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
352 !
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
353 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
354
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
355 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
356
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
357 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
358 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
359 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
360 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
361 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
362 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
363 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
364 sendall(160 from 160) -> (568) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
365 sendall(450 from 450) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
366 write(160 from 160) -> (568) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
367 write(450 from 450) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
368 write(36 from 36) -> (692) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
369 write(23 from 23) -> (669) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
370 write(37 from 37) -> (632) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
371 write(41 from 41) -> (591) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
372 write(21 from 21) -> (570) Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
373 write(2 from 2) -> (568) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
374 write(450 from 450) -> (118) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
375 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
376 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
377 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
378 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
379 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
380 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
381 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
382 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
383 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
384 sendall(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
385 write(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
386 write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
387 write(23 from 23) -> (59) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
388 write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
389 write(22 from 41) -> (0) Content-Type: applicat (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
390 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
391 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
392 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
393 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
394
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
395 write(285) -> 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\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
396 write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
397
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
398 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
399
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
400 Server sends an incomplete HTTP response body to batch request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
401
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
402 $ hg serve --config badserver.closeaftersendbytes=793 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
403 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
404
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
405 TODO client spews a stack due to uncaught ValueError in batch.results()
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
406 #if no-chg
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
407 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
408 [1]
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
409 #else
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
410 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
411 [255]
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
412 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
413
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
414 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
415
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
416 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
417 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
418 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
419 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
420 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
421 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
422 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
423 sendall(160 from 160) -> (633) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
424 sendall(450 from 450) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
425 write(160 from 160) -> (633) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
426 write(450 from 450) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
427 write(36 from 36) -> (757) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
428 write(23 from 23) -> (734) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
429 write(37 from 37) -> (697) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
430 write(41 from 41) -> (656) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
431 write(21 from 21) -> (635) Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
432 write(2 from 2) -> (633) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
433 write(450 from 450) -> (183) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
434 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
435 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
436 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
437 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
438 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
439 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
440 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
441 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
442 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
443 sendall(159 from 159) -> (24) 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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
444 sendall(24 from 42) -> (0) 96ee1d7354c4ad7372047672 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
445 write(159 from 159) -> (24) 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 (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
446 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672 (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
447 write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
448 write(23 from 23) -> (124) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
449 write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
450 write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
451 write(20 from 20) -> (26) Content-Length: 42\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
452 write(2 from 2) -> (24) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
453 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672 (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
454 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
455 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
456 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
457 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
458
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
459
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
460 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
461
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
462 Server sends incomplete headers for getbundle response
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
463
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
464 $ hg serve --config badserver.closeaftersendbytes=940 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
465 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
466
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
467 TODO this output is terrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
468
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
469 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
470 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
471 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
472 ---%<--- (application/mercuri)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
473
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
474 ---%<---
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
475 !
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
476 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
477
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
478 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
479
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
480 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
481 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
482 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
483 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
484 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
485 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
486 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
487 sendall(160 from 160) -> (780) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
488 sendall(450 from 450) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
489 write(160 from 160) -> (780) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
490 write(450 from 450) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
491 write(36 from 36) -> (904) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
492 write(23 from 23) -> (881) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
493 write(37 from 37) -> (844) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
494 write(41 from 41) -> (803) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
495 write(21 from 21) -> (782) Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
496 write(2 from 2) -> (780) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
497 write(450 from 450) -> (330) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
498 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
499 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
500 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
501 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
502 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
503 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
504 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
505 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
506 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
507 sendall(159 from 159) -> (171) 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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
508 sendall(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
509 write(159 from 159) -> (171) 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 (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
510 write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
511 write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
512 write(23 from 23) -> (271) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
513 write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
514 write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
515 write(20 from 20) -> (173) Content-Length: 42\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
516 write(2 from 2) -> (171) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
517 write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
518 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
519 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
520 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
521 readline(*) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
522 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
523 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
524 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
525 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
526 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
527 sendall(129 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercuri (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
528 write(129 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercuri (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
529 write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
530 write(23 from 23) -> (70) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
531 write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
532 write(33 from 41) -> (0) Content-Type: application/mercuri (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
533 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
534 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
535 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
536 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
537
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
538 write(293) -> 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\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
539 write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
540
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
541 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
542
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
543 Server stops before it sends transfer encoding
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
544
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
545 $ hg serve --config badserver.closeaftersendbytes=973 -p $HGPORT -d --pid-file=hg.pid -E error.log
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
546 $ cat hg.pid > $DAEMON_PIDS
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
547
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
548 $ hg clone http://localhost:$HGPORT/ clone
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
549 requesting all changes
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
550 abort: stream ended unexpectedly (got 0 bytes, expected 1)
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
551 [255]
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
552
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
553 $ killdaemons.py $DAEMON_PIDS
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
554
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
555 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
556 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -3
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
557 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
558 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
559
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
560
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
561 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
562 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -4
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
563 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
564 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
565
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
566 write(293) -> 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\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
567 write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
568 #endif
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
569
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
570 $ rm -f error.log
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
571
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
572 Server sends empty HTTP body for getbundle
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
573
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
574 $ hg serve --config badserver.closeaftersendbytes=978 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
575 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
576
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
577 $ hg clone http://localhost:$HGPORT/ clone
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
578 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
579 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
580 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
581 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
582
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
583 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
584
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
585 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
586 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
587 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
588 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
589 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
590 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
591 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
592 sendall(160 from 160) -> (818) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
593 sendall(450 from 450) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
594 write(160 from 160) -> (818) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
595 write(450 from 450) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
596 write(36 from 36) -> (942) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
597 write(23 from 23) -> (919) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
598 write(37 from 37) -> (882) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
599 write(41 from 41) -> (841) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
600 write(21 from 21) -> (820) Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
601 write(2 from 2) -> (818) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
602 write(450 from 450) -> (368) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
603 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
604 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
605 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
606 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
607 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
608 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
609 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
610 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
611 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
612 sendall(159 from 159) -> (209) 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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
613 sendall(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
614 write(159 from 159) -> (209) 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 (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
615 write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
616 write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
617 write(23 from 23) -> (309) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
618 write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
619 write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
620 write(20 from 20) -> (211) Content-Length: 42\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
621 write(2 from 2) -> (209) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
622 write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
623 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
624 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
625 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
626 readline(*) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
627 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
628 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
629 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
630 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
631 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
632 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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
633 write(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 (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
634 write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
635 write(23 from 23) -> (108) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
636 write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
637 write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
638 write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
639 write(2 from 2) -> (0) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
640 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
641 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
642 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
643 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
644
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
645 write(293) -> 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\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
646 write(36) -> HTTP/1.1 500 Internal Server Error\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
647
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
648 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
649
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
650 Server sends partial compression string
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
651
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
652 $ hg serve --config badserver.closeaftersendbytes=1002 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
653 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
654
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
655 $ hg clone http://localhost:$HGPORT/ clone
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
656 requesting all changes
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
657 abort: HTTP request error (incomplete response)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
658 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
659 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
660
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
661 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
662
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
663 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
664 readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
665 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
666 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
667 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
668 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
669 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
670 sendall(160 from 160) -> (842) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
671 sendall(450 from 450) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
672 write(160 from 160) -> (842) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 450\r\n\r\n (py3 no-py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
673 write(450 from 450) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
674 write(36 from 36) -> (966) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
675 write(23 from 23) -> (943) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
676 write(37 from 37) -> (906) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
677 write(41 from 41) -> (865) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
678 write(21 from 21) -> (844) Content-Length: 450\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
679 write(2 from 2) -> (842) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
680 write(450 from 450) -> (392) batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
681 readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
682 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
683 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
684 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
685 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
686 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
687 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
688 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
689 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
690 sendall(159 from 159) -> (233) 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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
691 sendall(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
692 write(159 from 159) -> (233) 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 (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
693 write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
694 write(23 from 23) -> (333) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
695 write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
696 write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
697 write(20 from 20) -> (235) Content-Length: 42\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
698 write(2 from 2) -> (233) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
699 write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !)
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
700 readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
701 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
702 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
703 readline(*) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
704 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
705 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
706 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
707 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
708 readline(*) -> (2) \r\n (glob)
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
709 sendall(167 from 167) -> (24) 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 (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
710 sendall(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
711 sendall(9 from 9) -> (9) 4\r\nnone\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
712 sendall(9 from 9) -> (0) 4\r\nHG20\r\n (py36 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
713 write(167 from 167) -> (24) 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 (py3 no-py36 !)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
714 write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
715 write(23 from 23) -> (132) Server: badhttpserver\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
716 write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
717 write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
718 write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
719 write(2 from 2) -> (24) \r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
720 write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc) (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
721 write(9 from 9) -> (9) 4\r\nnone\r\n (no-py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
722 write(9 from 9) -> (0) 4\r\nHG20\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
723 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
724 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
725 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
726 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
727
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
728 write(27) -> 15\r\nInternal Server Error\r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
729
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
730 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
731
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
732 Server sends partial bundle2 header magic
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
733
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
734 $ hg serve --config badserver.closeaftersendbytes=999 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
735 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
736
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
737 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
738 requesting all changes
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
739 abort: HTTP request error (incomplete response) (py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
740 abort: HTTP request error (incomplete response; expected 4 bytes got 3) (no-py3 !)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
741 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
742 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
743
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
744 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
745
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
746 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
747 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -9
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
748 sendall(167 from 167) -> (21) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
749 sendall(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
750 sendall(9 from 9) -> (6) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
751 sendall(6 from 9) -> (0) 4\r\nHG2
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
752 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
753 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
754 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
755 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
756
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
757
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
758 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
759 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -11
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
760 readline(65537) -> (2) \r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
761 write(167 from 167) -> (21) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
762 write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n (no-py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
763 write(2 from 2) -> (21) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
764 write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
765 write(9 from 9) -> (6) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
766 write(6 from 9) -> (0) 4\r\nHG2
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
767 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
768 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
769 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
770 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
771
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
772 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
773 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
774
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
775 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
776
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
777 Server sends incomplete bundle2 stream params length
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
778
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
779 $ hg serve --config badserver.closeaftersendbytes=1008 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
780 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
781
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
782 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
783 requesting all changes
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
784 abort: HTTP request error (incomplete response) (py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
785 abort: HTTP request error (incomplete response; expected 4 bytes got 3) (no-py3 !)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
786 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
787 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
788
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
789 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
790
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
791 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
792 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -10
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
793 sendall(167 from 167) -> (30) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
794 sendall(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
795 sendall(9 from 9) -> (15) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
796 sendall(9 from 9) -> (6) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
797 sendall(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
798 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
799 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
800 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
801 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
802
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
803
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
804 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
805 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
806 readline(65537) -> (2) \r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
807 write(167 from 167) -> (30) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
808 write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n (no-py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
809 write(2 from 2) -> (30) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
810 write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
811 write(9 from 9) -> (15) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
812 write(9 from 9) -> (6) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
813 write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
814 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
815 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
816 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
817 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
818
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
819 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
820 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
821
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
822 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
823
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
824 Servers stops after bundle2 stream params header
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
825
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
826 $ hg serve --config badserver.closeaftersendbytes=1011 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
827 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
828
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
829 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
830 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
831 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
832 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
833 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
834
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
835 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
836
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
837 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
838 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -10
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
839 sendall(167 from 167) -> (33) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
840 sendall(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
841 sendall(9 from 9) -> (18) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
842 sendall(9 from 9) -> (9) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
843 sendall(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
844 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
845 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
846 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
847 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
848
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
849
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
850 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
851 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
852 readline(65537) -> (2) \r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
853 write(167 from 167) -> (33) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
854 write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n (no-py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
855 write(2 from 2) -> (33) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
856 write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
857 write(9 from 9) -> (18) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
858 write(9 from 9) -> (9) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
859 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
860 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
861 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
862 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
863 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
864
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
865 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
866 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
867
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
868 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
869
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
870 Server stops sending after bundle2 part header length
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
871
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
872 $ hg serve --config badserver.closeaftersendbytes=1020 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
873 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
874
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
875 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
876 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
877 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
878 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
879 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
880
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
881 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
882
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
883 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
884 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -11
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
885 sendall(167 from 167) -> (42) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
886 sendall(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
887 sendall(9 from 9) -> (27) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
888 sendall(9 from 9) -> (18) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
889 sendall(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
890 sendall(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
891 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
892 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
893 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
894 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
895
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
896
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
897 #else
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
898
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
899 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -13
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
900 readline(65537) -> (2) \r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
901 write(167 from 167) -> (42) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
902 write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n (no-py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
903 write(2 from 2) -> (42) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
904 write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
905 write(9 from 9) -> (27) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
906 write(9 from 9) -> (18) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
907 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
908 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
909 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
910 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
911 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
912 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
913
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
914 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
915 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
916
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
917 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
918
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
919 Server stops sending after bundle2 part header
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
920
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
921 $ hg serve --config badserver.closeaftersendbytes=1067 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
922 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
923
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
924 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
925 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
926 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
927 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
928 rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
929 abort: HTTP request error (incomplete response)
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
930 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
931 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
932
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
933 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
934
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
935 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
936 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
937 sendall(167 from 167) -> (89) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
938 sendall(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
939 sendall(9 from 9) -> (74) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
940 sendall(9 from 9) -> (65) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
941 sendall(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
942 sendall(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
943 sendall(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
944 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
945 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
946 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
947 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
948
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
949
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
950 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
951 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
952 readline(65537) -> (2) \r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
953 write(167 from 167) -> (89) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
954 write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n (no-py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
955 write(2 from 2) -> (89) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
956 write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
957 write(9 from 9) -> (74) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
958 write(9 from 9) -> (65) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
959 write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
960 write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
961 write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
962 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
963 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
964 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
965 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
966
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
967 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
968 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
969
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
970 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
971
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
972 Server stops after bundle2 part payload chunk size
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
973
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
974 $ hg serve --config badserver.closeaftersendbytes=1088 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
975 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
976
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
977 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
978 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
979 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
980 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
981 rollback completed
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
982 abort: HTTP request error (incomplete response) (py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
983 abort: HTTP request error (incomplete response; expected 466 bytes got 7) (no-py3 !)
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
984 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
985 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
986
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
987 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
988
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
989 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
990 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
991 sendall(167 from 167) -> (110) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
992 sendall(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
993 sendall(9 from 9) -> (95) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
994 sendall(9 from 9) -> (86) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
995 sendall(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
996 sendall(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
997 sendall(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
998 sendall(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
999 sendall(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1000 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1001 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1002 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1003 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1004
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1005
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1006 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1007 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -15
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1008 write(167 from 167) -> (110) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1009 write(2 from 2) -> (110) \r\n (no-py3 !)
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1010 write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1011 write(9 from 9) -> (95) 4\r\nnone\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1012 write(9 from 9) -> (86) 4\r\nHG20\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1013 write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1014 write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1015 write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1016 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1017 write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1018 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1019 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1020 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1021 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1022
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1023 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1024 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1025
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1026 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1027
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1028 Server stops sending in middle of bundle2 payload chunk
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1029
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
1030 $ hg serve --config badserver.closeaftersendbytes=1549 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1031 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1032
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1033 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1034 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1035 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1036 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1037 rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
1038 abort: HTTP request error (incomplete response)
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
1039 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1040 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1041
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1042 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1043
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1044 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1045 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1046 sendall(167 from 167) -> (571) 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
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1047 sendall(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1048 sendall(9 from 9) -> (556) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1049 sendall(9 from 9) -> (547) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1050 sendall(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1051 sendall(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1052 sendall(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1053 sendall(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1054 sendall(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1055 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1056 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1057 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1058 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1059
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1060
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1061 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1062 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -16
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1063 readline(65537) -> (2) \r\n (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1064 write(167 from 167) -> (571) 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 (py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1065 write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n (no-py3 !)
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1066 write(2 from 2) -> (571) \r\n (no-py3 !)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1067 write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1068 write(9 from 9) -> (556) 4\r\nnone\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1069 write(9 from 9) -> (547) 4\r\nHG20\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1070 write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1071 write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1072 write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1073 write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1074 write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1075 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1076 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1077 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1078 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1079
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1080 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1081 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1082
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1083 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1084
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1085 Server stops sending after 0 length payload chunk size
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1086
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
1087 $ hg serve --config badserver.closeaftersendbytes=1580 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1088 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1089
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1090 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1091 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1092 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1093 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1094 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1095 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1096 rollback completed
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1097 abort: HTTP request error (incomplete response) (py3 !)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1098 abort: HTTP request error (incomplete response; expected 32 bytes got 9) (no-py3 !)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
1099 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1100 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1101
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1102 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1103
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1104 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1105 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -16
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1106 sendall(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1107 sendall(9 from 9) -> (587) 4\r\nnone\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1108 sendall(9 from 9) -> (578) 4\r\nHG20\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1109 sendall(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1110 sendall(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1111 sendall(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1112 sendall(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1113 sendall(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1114 sendall(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1115 sendall(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1116 sendall(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1117 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1118 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1119 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1120 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1121
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1122
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1123 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1124 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -17
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1125 write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1126 write(9 from 9) -> (587) 4\r\nnone\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1127 write(9 from 9) -> (578) 4\r\nHG20\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1128 write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1129 write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1130 write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1131 write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1132 write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1133 write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1134 write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
1135 write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1136 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1137 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1138 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1139 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1140
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1141 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1142 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1143
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1144 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1145
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1146 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1147 This is before the 0 size chunked transfer part that signals end of HTTP response.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1148
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
1149 # $ hg serve --config badserver.closeaftersendbytes=1755 -p $HGPORT -d --pid-file=hg.pid -E error.log
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
1150 $ hg serve --config badserver.closeaftersendbytes=1862 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1151 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1152
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1153 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1154 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1155 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1156 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1157 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1158 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34483
diff changeset
1159 new changesets 96ee1d7354c4
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1160 updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1161 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1162
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1163 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1164
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1165 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1166 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -25
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1167 sendall(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1168 sendall(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1169 sendall(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1170 sendall(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1171 sendall(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1172 sendall(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1173 sendall(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1174 sendall(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1175 sendall(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1176 sendall(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1177 sendall(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1178 sendall(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1179 sendall(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1180 sendall(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1181 sendall(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1182 sendall(35 from 35) -> (72) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1183 sendall(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1184 sendall(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1185 sendall(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1186 sendall(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1187 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1188 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1189 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1190 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1191
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1192
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1193 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1194 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -26
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1195 write(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1196 write(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1197 write(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1198 write(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1199 write(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1200 write(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1201 write(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1202 write(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1203 write(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1204 write(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1205 write(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1206 write(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1207 write(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1208 write(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1209 write(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
37842
326b174c6a47 bundle2: mark the bundle2 part as advisory (issue5872)
Boris Feld <boris.feld@octobus.net>
parents: 37556
diff changeset
1210 write(35 from 35) -> (72) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc)
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1211 write(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1212 write(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1213 write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1214 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1215 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1216 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1217 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1218 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1219
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1220 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1221 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1222
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1223 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1224 $ rm -rf clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1225
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1226 Server sends a size 0 chunked-transfer size without terminating \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1227
39722
4bd6e444c76f bundle2: make server.bundle2.stream default to True
Anton Shestakov <av6@dwimlabs.net>
parents: 39484
diff changeset
1228 $ hg serve --config badserver.closeaftersendbytes=1865 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1229 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1230
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1231 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1232 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1233 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1234 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1235 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1236 added 1 changesets with 1 changes to 1 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34483
diff changeset
1237 new changesets 96ee1d7354c4
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1238 updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1239 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1240
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1241 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1242
41467
1016b81fa43e tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41466
diff changeset
1243 #if py36
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1244 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -26
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1245 sendall(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1246 sendall(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1247 sendall(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1248 sendall(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1249 sendall(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1250 sendall(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1251 sendall(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1252 sendall(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1253 sendall(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1254 sendall(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1255 sendall(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1256 sendall(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1257 sendall(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1258 sendall(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1259 sendall(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1260 sendall(35 from 35) -> (75) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1261 sendall(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1262 sendall(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1263 sendall(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1264 sendall(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1265 sendall(3 from 5) -> (0) 0\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1266 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1267 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1268 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1269 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1270
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1271
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1272 #else
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1273 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -27
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1274 write(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1275 write(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1276 write(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1277 write(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1278 write(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1279 write(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1280 write(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1281 write(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1282 write(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1283 write(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1284 write(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1285 write(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1286 write(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1287 write(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1288 write(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
37842
326b174c6a47 bundle2: mark the bundle2 part as advisory (issue5872)
Boris Feld <boris.feld@octobus.net>
parents: 37556
diff changeset
1289 write(35 from 35) -> (75) 1d\\r\\n\x16cache:rev-branch-cache\x00\x00\x00\x03\x00\x00\\r\\n (esc)
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1290 write(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
1291 write(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1292 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1293 write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1294 write(3 from 5) -> (0) 0\r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1295 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1296 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1297 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1298 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
1299
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1300 write(27) -> 15\r\nInternal Server Error\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
1301 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1302
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1303 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1304 $ rm -rf clone