annotate tests/test-http-bad-server.t @ 48633:f91f98e9834a

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