annotate tests/test-http-bad-server.t @ 52089:0b17a0578a48 stable

py-3-13: fix traceback matching for the new Python version
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 24 Oct 2024 15:35:45 +0200
parents dcaa2df1f688
children 19ae7730636a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
37845
b4b7427b5786 tests: remove #require killdaemons
Gregory Szorc <gregory.szorc@gmail.com>
parents: 37556
diff changeset
1 #require serve zstd
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
3 Client version is embedded in HTTP request and is effectively dynamic. Pin the
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
4 version so behavior is deterministic.
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
5
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
6 $ cat > fakeversion.py << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7 > from mercurial import util
40982
c296b8faa926 py3: byteify the fakeversion extension in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 40973
diff changeset
8 > util.version = lambda: b'4.2'
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9 > EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 $ cat >> $HGRCPATH << EOF
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
12 > [extensions]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
13 > fakeversion = `pwd`/fakeversion.py
40886
8aa7879adacf test: explicitly disable sparse-revlog in test-http-bad-server.t
Boris Feld <boris.feld@octobus.net>
parents: 40881
diff changeset
14 > [format]
8aa7879adacf test: explicitly disable sparse-revlog in test-http-bad-server.t
Boris Feld <boris.feld@octobus.net>
parents: 40881
diff changeset
15 > sparse-revlog = no
46876
a8fa270a0e86 persistent-nodemap: disable it unconditionally for test-http-bad-server.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46633
diff changeset
16 > use-persistent-nodemap = no
34322
10e162bb9bf5 pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents: 34308
diff changeset
17 > [devel]
10e162bb9bf5 pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents: 34308
diff changeset
18 > legacy.exchange = phases
44412
edc8504bc26b exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42897
diff changeset
19 > [server]
edc8504bc26b exchange: turn on option that makes concurrent pushes work better
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 42897
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]
48605
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
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
39 ----------------------------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
40
48606
ee1235afda4b test-http-bad-server: rename config to use `-`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48605
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
40973
97484e1d1834 tests: followup on network related errors on Debian 9
Boris Feld <boris.feld@octobus.net>
parents: 40936
diff changeset
45 abort: error: (\$ECONNRESET\$|\$EADDRNOTAVAIL\$) (re)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
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
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
54 --------------------------------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
55
48606
ee1235afda4b test-http-bad-server: rename config to use `-`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48605
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
35232
a037b6647d8c tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 35074
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)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
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
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
74 -----------------------------------------------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
75
48606
ee1235afda4b test-http-bad-server: rename config to use `-`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48605
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
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
80 abort: error: bad HTTP status line: * (glob)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
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
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
86 readline(1 from ~) -> (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
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
92 -----------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
93
48638
1ae83cafaa39 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48636
diff changeset
94 $ hg serve \
1ae83cafaa39 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48636
diff changeset
95 > --config badserver.close-after-recv-patterns="GET /\?cmd=capabilities" \
1ae83cafaa39 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48636
diff changeset
96 > --config badserver.close-after-recv-bytes=7 \
1ae83cafaa39 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48636
diff changeset
97 > -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
98 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
99 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
100 abort: error: bad HTTP status line: * (glob)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
diff changeset
101 [100]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
102
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
104
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
105 $ cat error.log
48638
1ae83cafaa39 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48636
diff changeset
106 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
107 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
108 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
109
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
110 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
111
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
112 Failure on subsequent HTTP request on the same socket (cmd?batch)
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
113 -----------------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
114
48639
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
115 $ hg serve \
48640
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
116 > --config badserver.close-after-recv-patterns="GET /\?cmd=batch,GET /\?cmd=batch" \
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
117 > --config badserver.close-after-recv-bytes=15,197 \
48639
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
118 > -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
119 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
120 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
121 abort: error: bad HTTP status line: * (glob)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
diff changeset
122 [100]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
123
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
124 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
125
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
126 $ cat error.log
48639
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
127 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
128 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
129 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
130 readline(*) -> (*) host: localhost:$HGPORT\r\n (glob)
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
131 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
132 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
133 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
134 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48639
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
135 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
ebd515d129c6 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48638
diff changeset
136 readline(*) -> (1?) Accept-Encoding* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
137 read limit reached; closing socket
48640
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
138 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
139 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
140 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
141 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
142 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
316b912c47f5 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48639
diff changeset
143 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
144 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
145 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
146
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
147 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
148
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
149 Failure to read getbundle HTTP request
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
150 --------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
151
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
152 $ hg serve \
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
153 > --config badserver.close-after-recv-patterns="GET /\?cmd=batch,user-agent: mercurial/proto-1.0,GET /\?cmd=getbundle" \
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
154 > --config badserver.close-after-recv-bytes=110,26,281 \
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
155 > -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
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
159 abort: error: bad HTTP status line: * (glob)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
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
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
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: 35259
diff changeset
166 readline(1 from -1) -> (1) x (?)
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
167 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
168 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
169 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
170 readline(*) -> (*) host: localhost:$HGPORT\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
171 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
172 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
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: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
174 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
175 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
176 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
177 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
178 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
179 readline(*) -> (1?) x-hgproto-1:* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
180 read limit reached; closing socket
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
181 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
182 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
183 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
184 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
185 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
186 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
187 readline(*) -> (*) host: localhost:$HGPORT\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
188 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
189 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
190 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
191 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
192 readline(24 from ~) -> (*) GET /?cmd=getbundle HTTP* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
193 read limit reached; closing socket
48641
36a41521ed57 test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48640
diff changeset
194 readline(~) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
195 readline(281 from *) -> (27) Accept-Encoding: identity\r\n (glob)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
196 readline(254 from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
197 readline(225 from *) -> (225) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
198 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
199
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
200 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
201
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
202 Now do a variation using POST to send arguments
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
203 ===============================================
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
204
48642
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
205 $ hg serve \
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
206 > --config badserver.close-after-recv-patterns="x-hgargs-post:,user-agent: mercurial/proto-1.0" \
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
207 > --config badserver.close-after-recv-bytes="14,26" \
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
208 > --config experimental.httppostargs=true \
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
209 > -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
210 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
211
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
212 $ hg clone http://localhost:$HGPORT/ clone
40926
21f5810df848 test: fix test-http-bad-server with current python 2.7
Julien Cristau <jcristau@mozilla.com>
parents: 39722
diff changeset
213 abort: error: bad HTTP status line: * (glob)
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
diff changeset
214 [100]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
215
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
216 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
217
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
218 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48642
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
219 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
220 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
221 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
222 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
223 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
224 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
225 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
226 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48642
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
227 readline(~) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
228 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
229 readline(*) -> (41) content-type: application/mercurial-0.1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
230 readline(*) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
231 readline(*) -> (19) x-hgargs-post: 28\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
232 readline(*) -> (1?) x-hgproto-1: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
233 read limit reached; closing socket
48642
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
234 readline(~) -> (27) POST /?cmd=batch HTTP/1.1\r\n
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
235 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
236 readline(*) -> (41) content-type: application/mercurial-0.1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
237 readline(*) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
238 readline(*) -> (19) x-hgargs-post: 28\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
239 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
240 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
241 readline(*) -> (20) content-length: 28\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
242 readline(*) -> (*) host: localhost:$HGPORT\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
243 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
244 readline(*) -> (2) \r\n (glob)
009e86022a9d test-http-bad-server: use the new pattern-reading for a test-case
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48641
diff changeset
245 read(24 from 28) -> (*) cmds=* (glob)
48608
f87b632406a9 test-http-bad-server: align output by using `;`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48607
diff changeset
246 read limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
247 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
248 Traceback (most recent call last):
52089
0b17a0578a48 py-3-13: fix traceback matching for the new Python version
Raphaël Gomès <rgomes@octobus.net>
parents: 51181
diff changeset
249 rctx, req, res, self.check_perm (py313 !)
0b17a0578a48 py-3-13: fix traceback matching for the new Python version
Raphaël Gomès <rgomes@octobus.net>
parents: 51181
diff changeset
250 ) (py313 !)
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
251 Exception: connection closed after receiving N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
252
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
253
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
254 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
255
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
256 Now move on to partial server responses
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
257 =======================================
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
258
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
259 Server sends a single character from the HTTP response line
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
260 -----------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
261
48606
ee1235afda4b test-http-bad-server: rename config to use `-`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48605
diff changeset
262 $ 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
263 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
264
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
265 $ hg clone http://localhost:$HGPORT/ clone
34308
9bd003052d55 keepalive: add more context to bad status line errors
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32319
diff changeset
266 abort: error: bad HTTP status line: H
45839
ebee234d952a errors: set detailed exit code to 100 for some remote errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 44412
diff changeset
267 [100]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
268
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
269 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
270
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
271 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
272 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
273 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
274 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
275 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
276 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
277 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
278 sendall(1 from 160) -> (0) H
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
279 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
280 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
281 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
282 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
283
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
284
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
285 $ rm -f error.log
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 Server sends an incomplete capabilities response body
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
288 -----------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
289
48619
e5313a1e0a26 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48615
diff changeset
290 $ hg serve \
e5313a1e0a26 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48615
diff changeset
291 > --config badserver.close-after-send-patterns='batch branchmap bund' \
e5313a1e0a26 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48615
diff changeset
292 > -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
293 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
294
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
295 $ hg clone http://localhost:$HGPORT/ clone
48643
1e28c4209fff test-http-bad-server: abstract the `streamreqs` value
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48642
diff changeset
296 abort: HTTP request error (incomplete response; expected * bytes got 20) (glob)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
297 (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
298 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
299
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
300 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
301
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
302 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
303 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
304 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
305 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
306 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
307 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
308 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
309 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
310 sendall(20 from *) -> (0) batch branchmap bund (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
311 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
312 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=capabilities': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
313 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
314 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
315
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
316
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
317 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
318
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
319 Server sends incomplete headers for batch request
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
320 -------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
321
48620
c5f734ef0b15 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48619
diff changeset
322 $ hg serve \
c5f734ef0b15 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48619
diff changeset
323 > --config badserver.close-after-send-patterns='(.*Content-Type: applicat){2}' \
c5f734ef0b15 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48619
diff changeset
324 > -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
325 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
326
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
327 TODO this output is horrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
328
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
329 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
330 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
331 ---%<--- (applicat)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
332
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
333 ---%<---
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45839
diff changeset
334
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
335 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
336
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
337 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
338
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
339 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
340 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
341 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
342 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
343 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
344 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
345 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
346 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
347 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
348 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
349 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
350 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
351 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
352 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
353 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
354 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
355 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
356 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
357 sendall(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
358 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
359 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
360 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
361 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
362
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
363
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
364 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
365
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
366 Server sends an incomplete HTTP response body to batch request
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
367 --------------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
368
48621
b38a15822208 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48620
diff changeset
369 $ hg serve \
b38a15822208 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48620
diff changeset
370 > --config badserver.close-after-send-patterns=96ee1d7354c4ad7372047672 \
b38a15822208 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48620
diff changeset
371 > -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
372 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
373
49248
63fd0282ad40 node: stop converting binascii.Error to TypeError in bin()
Manuel Jacob <me@manueljacob.de>
parents: 48874
diff changeset
374 $ hg clone http://localhost:$HGPORT/ clone
63fd0282ad40 node: stop converting binascii.Error to TypeError in bin()
Manuel Jacob <me@manueljacob.de>
parents: 48874
diff changeset
375 abort: unexpected response:
63fd0282ad40 node: stop converting binascii.Error to TypeError in bin()
Manuel Jacob <me@manueljacob.de>
parents: 48874
diff changeset
376 '96ee1d7354c4ad7372047672'
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
377 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
378
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
379 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
380
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
381 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
382 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
383 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
384 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
385 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
386 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
387 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
388 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
389 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
390 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
391 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
392 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
393 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
394 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
395 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
396 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
397 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
398 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
399 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
400 sendall(24 from 42) -> (0) 96ee1d7354c4ad7372047672
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
401 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
402 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=batch': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
403 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
404 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
405
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
406
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
407 $ rm -f error.log
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 Server sends incomplete headers for getbundle response
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
410 ------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
411
48622
7de3e7451763 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48621
diff changeset
412 $ hg serve \
7de3e7451763 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48621
diff changeset
413 > --config badserver.close-after-send-patterns='(.*Content-Type: application/mercuri){3}' \
7de3e7451763 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48621
diff changeset
414 > -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 this output is terrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
418
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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
420 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
421 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
422 ---%<--- (application/mercuri)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
423
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
424 ---%<---
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45839
diff changeset
425
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
426 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
427
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
428 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
429
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
430 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
431 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
432 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
433 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
434 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
435 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
436 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
437 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
438 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
439 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
440 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
441 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
442 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
443 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
444 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
445 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
446 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
447 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
448 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
449 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
450 readline(~) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
451 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
452 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
453 readline(*) -> (447) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
454 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
455 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
456 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
457 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
458 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
459 sendall(129 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercuri
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
460 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
461 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
462 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
463 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
464
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
465
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
466 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
467
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
468 Server stops before it sends transfer encoding
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
469 ----------------------------------------------
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
470
48624
8a452efcce3c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48623
diff changeset
471 $ hg serve \
8a452efcce3c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48623
diff changeset
472 > --config badserver.close-after-send-patterns="Transfer-Encoding: chunke" \
8a452efcce3c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48623
diff changeset
473 > -p $HGPORT -d --pid-file=hg.pid -E error.log
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
474 $ cat hg.pid > $DAEMON_PIDS
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
475
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
476 $ hg clone http://localhost:$HGPORT/ clone
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
477 requesting all changes
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
478 abort: stream ended unexpectedly (got 0 bytes, expected 1)
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
479 [255]
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
480
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
481 $ killdaemons.py $DAEMON_PIDS
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
482
48623
38028f3ef80c test-http-bad-server: modify some `tail` call fit their goal
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48622
diff changeset
483 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -6
38028f3ef80c test-http-bad-server: modify some `tail` call fit their goal
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48622
diff changeset
484 sendall(162 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunke
38028f3ef80c test-http-bad-server: modify some `tail` call fit their goal
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48622
diff changeset
485 write limit reached; closing socket
38028f3ef80c test-http-bad-server: modify some `tail` call fit their goal
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48622
diff changeset
486 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
487 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
488 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
489
39484
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
490 $ rm -f error.log
98995b689e03 httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents: 39483
diff changeset
491
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
492 Server sends empty HTTP body for getbundle
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
493 ------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
494
48625
fd7c578ddfd3 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48624
diff changeset
495 $ hg serve \
fd7c578ddfd3 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48624
diff changeset
496 > --config badserver.close-after-send-patterns='Transfer-Encoding: chunked\r\n\r\n' \
fd7c578ddfd3 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48624
diff changeset
497 > -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
498 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
499
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
500 $ 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
501 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
502 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
503 (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
504 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
505
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
506 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
507
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
508 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
509 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
510 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
511 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
512 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
513 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
514 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
515 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
516 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
517 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
518 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
519 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
520 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
521 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
522 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
523 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
524 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
525 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
526 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
527 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
528 readline(~) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
529 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
530 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
531 readline(*) -> (447) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
532 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
533 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
534 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
535 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
536 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
537 sendall(167 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
538 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
539 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
540 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
541 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
542
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
543
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
544 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
545
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
546 Server sends partial compression string
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
547 ---------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
548
48626
62f1c8588fcc test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48625
diff changeset
549 $ hg serve \
62f1c8588fcc test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48625
diff changeset
550 > --config badserver.close-after-send-patterns='4\r\nHG20\r\n' \
62f1c8588fcc test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48625
diff changeset
551 > -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
552 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
553
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
554 $ 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
555 requesting all changes
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
556 abort: HTTP request error (incomplete response)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
557 (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
558 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
559
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
560 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
561
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
562 $ cat error.log | "$PYTHON" $TESTDIR/filtertraceback.py
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
563 readline(~) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
564 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
565 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
566 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
567 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
568 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
569 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: *\r\n\r\n (glob)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
570 sendall(*) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=* unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (glob)
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
571 readline(~) -> (26) GET /?cmd=batch HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
572 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
573 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
574 readline(*) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
575 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
576 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
577 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
578 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
579 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
580 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
581 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
48615
e38776a4c2cb test-http-bad-server: replace the default 65537 value in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48611
diff changeset
582 readline(~) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
583 readline(*) -> (27) Accept-Encoding: identity\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
584 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
585 readline(*) -> (447) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%252C03%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob)
41465
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
586 readline(*) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
587 readline(*) -> (35) accept: application/mercurial-0.1\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
588 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
589 readline(*) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
33560f3bbcd3 tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41462
diff changeset
590 readline(*) -> (2) \r\n (glob)
50382
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
591 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
592 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
593 sendall(9) -> 4\r\nnone\r\n
c0d9af0ff0fa tests: drop py36 conditionals in test-http-bad-server.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 50381
diff changeset
594 sendall(9 from 9) -> (0) 4\r\nHG20\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
595 write limit reached; closing socket
41462
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
596 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
597 Traceback (most recent call last):
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
598 Exception: connection closed after sending N bytes
9b2b8794f801 hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents: 40982
diff changeset
599
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
600
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
601 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
602
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
603 Server sends partial bundle2 header magic
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
604 -----------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
605
48627
26105e9b0487 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48626
diff changeset
606 $ hg serve \
26105e9b0487 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48626
diff changeset
607 > --config badserver.close-after-send-patterns='4\r\nHG2' \
26105e9b0487 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48626
diff changeset
608 > -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
609 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
610
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
611 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
612 requesting all changes
49499
4f36738a869a tests: fix http-bad-server expected errors for python 3.10 (issue6643)
pacien <pacien.trangirard@pacien.net>
parents: 49248
diff changeset
613 abort: HTTP request error (incomplete response*) (glob)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
614 (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
615 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
616
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
617 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
618
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
619 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -9
48627
26105e9b0487 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48626
diff changeset
620 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
26105e9b0487 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48626
diff changeset
621 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
26105e9b0487 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48626
diff changeset
622 sendall(9) -> 4\r\nnone\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
623 sendall(6 from 9) -> (0) 4\r\nHG2
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
624 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
625 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
626 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
627 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
628
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
629 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
630
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
631 Server sends incomplete bundle2 stream params length
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
632 ----------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
633
48628
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
634 $ hg serve \
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
635 > --config badserver.close-after-send-patterns='4\r\n\0\0\0' \
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
636 > -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
637 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
638
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
639 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
640 requesting all changes
49499
4f36738a869a tests: fix http-bad-server expected errors for python 3.10 (issue6643)
pacien <pacien.trangirard@pacien.net>
parents: 49248
diff changeset
641 abort: HTTP request error (incomplete response*) (glob)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
642 (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
643 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
644
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
645 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
646
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
647 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -10
48628
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
648 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
649 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
650 sendall(9) -> 4\r\nnone\r\n
ea2f4f4e464e test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48627
diff changeset
651 sendall(9) -> 4\r\nHG20\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
652 sendall(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
653 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
654 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
655 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
656 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
657
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
658 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
659
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
660 Servers stops after bundle2 stream params header
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
661 ------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
662
48629
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
663 $ hg serve \
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
664 > --config badserver.close-after-send-patterns='4\r\n\0\0\0\0\r\n' \
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
665 > -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
666 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
667
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
668 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
669 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
670 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
671 (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
672 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
673
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
674 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
675
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
676 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -10
48629
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
677 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
678 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
679 sendall(9) -> 4\r\nnone\r\n
177ef11a4a58 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48628
diff changeset
680 sendall(9) -> 4\r\nHG20\r\n
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
681 sendall(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
682 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
683 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
684 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
685 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
686
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
687 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
688
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
689 Server stops sending after bundle2 part header length
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
690 -----------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
691
48630
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
692 $ hg serve \
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
693 > --config badserver.close-after-send-patterns='4\r\n\0\0\0\)\r\n' \
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
694 > -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
695 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
696
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
697 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
698 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
699 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
700 (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
701 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
702
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
703 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
704
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
705 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -11
48630
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
706 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
707 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
708 sendall(9) -> 4\r\nnone\r\n
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
709 sendall(9) -> 4\r\nHG20\r\n
3e0462ae6230 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48629
diff changeset
710 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
711 sendall(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
712 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
713 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
714 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
715 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
716
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
717 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
718
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
719 Server stops sending after bundle2 part header
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
720 ----------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
721
48631
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
722 $ hg serve \
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
723 > --config badserver.close-after-send-patterns="version03nbchanges1\\r\\n" \
48631
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
724 > -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
725 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
726
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
727 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
728 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
729 adding changesets
51181
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51106
diff changeset
730 transaction abort!
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51106
diff changeset
731 rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
732 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
733 (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
734 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
735
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
736 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
737
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
738 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12
48631
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
739 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
740 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
741 sendall(9) -> 4\r\nnone\r\n
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
742 sendall(9) -> 4\r\nHG20\r\n
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
743 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
42057c14bf69 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48630
diff changeset
744 sendall(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
745 sendall(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version03nbchanges1\\r\\n (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
746 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
747 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
748 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
749 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
750
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
751 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
752
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
753 Server stops after bundle2 part payload chunk size
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
754 --------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
755
48632
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
756 $ hg serve \
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
757 > --config badserver.close-after-send-patterns='1dc\r\n.......' \
48632
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
758 > -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
759 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
760
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
761 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
762 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
763 adding changesets
51181
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51106
diff changeset
764 transaction abort!
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51106
diff changeset
765 rollback completed
49499
4f36738a869a tests: fix http-bad-server expected errors for python 3.10 (issue6643)
pacien <pacien.trangirard@pacien.net>
parents: 49248
diff changeset
766 abort: HTTP request error (incomplete response*) (glob)
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
767 (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
768 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
769
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
770 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
771
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
772 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14
48632
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
773 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
774 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
775 sendall(9) -> 4\r\nnone\r\n
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
776 sendall(9) -> 4\r\nHG20\r\n
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
777 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
387f47807ca7 test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48631
diff changeset
778 sendall(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
779 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version03nbchanges1\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
780 sendall(9) -> 4\\r\\n\x00\x00\x01\xdc\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
781 sendall(12 from 483) -> (0) 1dc\\r\\n\x00\x00\x00\xb4\x96\xee\x1d (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
782 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
783 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
784 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
785 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
786
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
787 $ rm -f error.log
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 Server stops sending in middle of bundle2 payload chunk
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
790 -------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
791
48633
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
792 $ hg serve \
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
793 > --config badserver.close-after-send-patterns=':jL\0\0\x00\0\0\0\0\0\0\0\r\n' \
48633
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
794 > -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
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
799 adding changesets
51181
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51106
diff changeset
800 transaction abort!
dcaa2df1f688 changelog: never inline changelog
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51106
diff changeset
801 rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
802 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
803 (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
804 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
805
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
806 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
807
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
808 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14
48633
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
809 sendall(167) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
810 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
811 sendall(9) -> 4\r\nnone\r\n
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
812 sendall(9) -> 4\r\nHG20\r\n
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
813 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
52aa9b505c8f test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48632
diff changeset
814 sendall(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
815 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version03nbchanges1\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
816 sendall(9) -> 4\\r\\n\x00\x00\x01\xdc\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
817 sendall(483 from 483) -> (0) 1dc\\r\\n\x00\x00\x00\xb4\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa3j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00j\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
818 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
819 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
820 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
821 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
822
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
823 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
824
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
825 Server stops sending after 0 length payload chunk size
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
826 ------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
827
48634
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
828 $ hg serve \
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
829 > --config badserver.close-after-send-patterns=LISTKEYS \
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
830 > -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
831 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
832
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
833 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
834 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
835 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
836 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
837 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
838 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
839 rollback completed
49499
4f36738a869a tests: fix http-bad-server expected errors for python 3.10 (issue6643)
pacien <pacien.trangirard@pacien.net>
parents: 49248
diff changeset
840 abort: HTTP request error (incomplete response*) (glob)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
841 (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
842 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
843
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
844 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
845
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
846 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -16
48634
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
847 sendall(6) -> 1\\r\\n\x04\\r\\n (esc)
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
848 sendall(9) -> 4\r\nnone\r\n
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
849 sendall(9) -> 4\r\nHG20\r\n
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
850 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
851 sendall(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
852 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version03nbchanges1\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
853 sendall(9) -> 4\\r\\n\x00\x00\x01\xdc\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
854 sendall(483) -> 1dc\\r\\n\x00\x00\x00\xb4\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa3j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00j\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
48634
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
855 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4e772a5dfa5b test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48633
diff changeset
856 sendall(9) -> 4\\r\\n\x00\x00\x00 \\r\\n (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
857 sendall(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
858 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
859 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
860 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
861 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
862
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
863 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
864
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
865 Server stops sending after 0 part bundle part header (indicating end of bundle2 payload)
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
866 ----------------------------------------------------------------------------------------
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
867
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
868 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
869
48635
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
870 $ hg serve \
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
871 > --config badserver.close-after-send-patterns='(.*4\r\n\0\0\0\0\r\n){5}' \
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
872 > -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
873 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
874
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
875 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
876 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
877 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
878 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
879 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
880 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
881 new changesets 96ee1d7354c4
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
882 updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
883 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
884
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
885 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
886
46633
7015b0232c5e exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents: 45906
diff changeset
887 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -20
48635
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
888 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
889 sendall(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
890 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version03nbchanges1\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
891 sendall(9) -> 4\\r\\n\x00\x00\x01\xdc\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
892 sendall(483) -> 1dc\\r\\n\x00\x00\x00\xb4\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa3j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00j\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
48635
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
893 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
894 sendall(9) -> 4\\r\\n\x00\x00\x00 \\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
895 sendall(38) -> 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
896 sendall(9) -> 4\\r\\n\x00\x00\x00:\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
897 sendall(64) -> 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
898 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
899 sendall(9) -> 4\\r\\n\x00\x00\x00#\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
900 sendall(41) -> 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
6a9f3cd38faa test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48634
diff changeset
901 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
902 sendall(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
903 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
904 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
905 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
906 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
907
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
908 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
909 $ rm -rf clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
910
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
911 Server sends a size 0 chunked-transfer size without terminating \r\n
48607
89485747b8f7 test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48606
diff changeset
912 --------------------------------------------------------------------
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
913
48636
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
914 $ hg serve \
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
915 > --config badserver.close-after-send-patterns="(.*4\\r\\n\0\0\0\0\\r\\n0\r\n)" \
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
916 > -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
917 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
918
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
919 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
920 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
921 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
922 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
923 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
924 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
925 new changesets 96ee1d7354c4
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
926 updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
927 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
928
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
929 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
930
46633
7015b0232c5e exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents: 45906
diff changeset
931 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -21
48636
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
932 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
933 sendall(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc)
50381
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
934 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version03nbchanges1\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
935 sendall(9) -> 4\\r\\n\x00\x00\x01\xdc\\r\\n (esc)
2cf264e9aa75 configitems: enable changegroup3 by default (unless using infinitepush)
Matt Harbison <matt_harbison@yahoo.com>
parents: 49877
diff changeset
936 sendall(483) -> 1dc\\r\\n\x00\x00\x00\xb4\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa3j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00j\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
48636
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
937 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
938 sendall(9) -> 4\\r\\n\x00\x00\x00 \\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
939 sendall(38) -> 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
940 sendall(9) -> 4\\r\\n\x00\x00\x00:\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
941 sendall(64) -> 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
942 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
943 sendall(9) -> 4\\r\\n\x00\x00\x00#\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
944 sendall(41) -> 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
945 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
b169767ecc8c test-http-bad-server: move on test from bytes-count to pattern
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48635
diff changeset
946 sendall(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
41466
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
947 sendall(3 from 5) -> (0) 0\r\n
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
948 write limit reached; closing socket
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
949 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob)
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
950 Traceback (most recent call last):
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
951 Exception: connection closed after sending N bytes
4d5aae86c9bd tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents: 41465
diff changeset
952
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
953 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
954 $ rm -rf clone