Mercurial > hg
annotate tests/test-http-bad-server.t @ 48641:36a41521ed57
test-http-bad-server: use the new pattern-reading for a test-case
This test case is now less sensitive to change of unrelated bits of the
client/server exchange.
Since this introduce some churn in the output, we do it independently for each
test cases.
Differential Revision: https://phab.mercurial-scm.org/D12072
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 21 Jan 2022 19:25:57 +0100 |
parents | 316b912c47f5 |
children | 009e86022a9d |
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) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
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: 431\r\n\r\n (py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
134 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
135 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
136 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
137 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
138 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
139 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
140 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
141 write(21) -> Content-Length: 431\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
142 write(2) -> \r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
143 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
144 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
|
145 readline(*) -> (1?) Accept-Encoding* (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
146 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
|
147 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
|
148 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
|
149 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
|
150 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
|
151 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
|
152 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
|
153 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
|
154 read limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
155 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
156 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
157 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
158 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
|
159 -------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
160 |
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
|
161 $ 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
|
162 > --config badserver.close-after-recv-patterns="GET /\?cmd=batch,user-agent: mercurial/proto-1.0,GET /\?cmd=getbundle" \ |
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
|
163 > --config badserver.close-after-recv-bytes=110,26,274 \ |
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
|
164 > -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
|
165 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
166 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
167 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
|
168 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
|
169 [100] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
170 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
171 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
172 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
173 $ cat error.log |
35268
44b8b5ad30eb
pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35259
diff
changeset
|
174 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
|
175 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
|
176 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
|
177 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
|
178 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
|
179 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
|
180 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
|
181 readline(*) -> (2) \r\n (glob) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
182 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
183 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
184 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
185 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
186 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
187 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
188 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
189 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
190 write(21) -> Content-Length: 431\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
191 write(2) -> \r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
192 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
193 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
|
194 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
|
195 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
|
196 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
|
197 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
|
198 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
|
199 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
|
200 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
|
201 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
|
202 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
|
203 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
|
204 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
|
205 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
|
206 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
|
207 readline(*) -> (2) \r\n (glob) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
208 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
209 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
210 write(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py3 no-py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
211 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py3 no-py36 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
212 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
213 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
214 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
215 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
216 write(20) -> Content-Length: 42\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
217 write(2) -> \r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
218 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !) |
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
|
219 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
|
220 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
|
221 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
|
222 readline(274 from *) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
223 readline(247 from *) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
224 readline(218 from *) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
225 read limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
226 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
227 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
228 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
229 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
|
230 =============================================== |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
231 |
48606
ee1235afda4b
test-http-bad-server: rename config to use `-`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48605
diff
changeset
|
232 $ hg serve --config experimental.httppostargs=true --config badserver.close-after-recv-bytes=329,344 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
233 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
234 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
235 $ 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
|
236 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
|
237 [100] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
238 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
239 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
240 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
241 $ 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
|
242 readline(329 from ~) -> (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
|
243 readline(296 from *) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
244 readline(269 from *) -> (35) accept: application/mercurial-0.1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
245 readline(234 from *) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
246 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
247 readline(* from *) -> (2) \r\n (glob) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
248 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 444\r\n\r\n (py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
249 sendall(444) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
250 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 444\r\n\r\n (py3 no-py36 !) |
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
251 write(444) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
252 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
253 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
254 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
255 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
256 write(21) -> Content-Length: 444\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
257 write(2) -> \r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
258 write(444) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
259 readline(1?? from ~) -> (27) POST /?cmd=batch HTTP/1.1\r\n (glob) |
41465
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
260 readline(1?? from *) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
261 readline(1?? from *) -> (41) content-type: application/mercurial-0.1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
262 readline(6? from *) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
263 readline(3? from *) -> (19) x-hgargs-post: 28\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
264 readline(1? from *) -> (1?) x-hgproto-1: * (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
265 read limit reached; closing socket |
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
|
266 readline(344 from ~) -> (27) POST /?cmd=batch HTTP/1.1\r\n |
41465
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
267 readline(317 from *) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
268 readline(290 from *) -> (41) content-type: application/mercurial-0.1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
269 readline(249 from *) -> (33) vary: X-HgArgs-Post,X-HgProto-1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
270 readline(216 from *) -> (19) x-hgargs-post: 28\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
271 readline(197 from *) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
272 readline(136 from *) -> (35) accept: application/mercurial-0.1\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
273 readline(101 from *) -> (20) content-length: 28\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
274 readline(81 from *) -> (*) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
275 readline(* from *) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
276 readline(* from *) -> (2) \r\n (glob) |
37498
aacfca6f9767
wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents:
37413
diff
changeset
|
277 read(* 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
|
278 read limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
279 $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
|
280 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
281 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
|
282 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
283 write(126) -> HTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
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 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
|
288 ======================================= |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
290 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
|
291 ----------------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
292 |
48606
ee1235afda4b
test-http-bad-server: rename config to use `-`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48605
diff
changeset
|
293 $ 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
|
294 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
295 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
296 $ 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
|
297 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
|
298 [100] |
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) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
309 sendall(1 from 160) -> (0) H (py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
310 write(1 from 160) -> (0) H (py3 no-py36 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
311 write(1 from 36) -> (0) H (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
312 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
313 $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
|
314 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
315 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
|
316 |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
317 write(286) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
318 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
319 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
320 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
321 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
|
322 ----------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
323 |
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
|
324 $ 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
|
325 > --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
|
326 > -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
|
327 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
328 |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
329 $ hg clone http://localhost:$HGPORT/ clone |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
330 abort: HTTP request error (incomplete response; expected 431 bytes got 20) |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
331 (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
|
332 [255] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
333 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
334 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
335 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
336 $ 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
|
337 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
|
338 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
339 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
|
340 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
341 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
|
342 readline(*) -> (2) \r\n (glob) |
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
|
343 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
344 sendall(20 from 431) -> (0) batch branchmap bund (py36 !) |
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
|
345 write(160) -> (20) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
346 write(20 from 431) -> (0) batch branchmap bund (py3 no-py36 !) |
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
|
347 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
348 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
349 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
350 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
351 write(21) -> Content-Length: 431\r\n (no-py3 !) |
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
|
352 write(2) -> \r\n (no-py3 !) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
353 write(20 from 431) -> (0) batch branchmap bund (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
354 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
355 $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
|
356 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
357 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
|
358 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
359 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
360 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
361 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
362 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
|
363 ------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
364 |
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
|
365 $ 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
|
366 > --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
|
367 > -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
|
368 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
369 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
370 TODO this output is horrible |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
371 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
372 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
373 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
|
374 ---%<--- (applicat) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
375 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
376 ---%<--- |
45906
95c4cca641f6
errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents:
45839
diff
changeset
|
377 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
378 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
379 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
380 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
381 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
382 $ 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
|
383 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
|
384 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
385 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
|
386 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
387 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
|
388 readline(*) -> (2) \r\n (glob) |
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
|
389 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
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
|
390 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
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
|
391 write(160) -> (568) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
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
|
392 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
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
|
393 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
394 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
395 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
396 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
397 write(21) -> Content-Length: 431\r\n (no-py3 !) |
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
|
398 write(2) -> \r\n (no-py3 !) |
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
|
399 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
400 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
|
401 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
402 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
|
403 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
|
404 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
|
405 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
|
406 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
407 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
|
408 readline(*) -> (2) \r\n (glob) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
409 sendall(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
410 write(118 from 159) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: applicat (py3 no-py36 !) |
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
|
411 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
412 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
413 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
414 write(22 from 41) -> (0) Content-Type: applicat (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
415 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
416 $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
|
417 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
418 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
|
419 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
420 write(285) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
421 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
422 $ rm -f error.log |
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 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
|
425 -------------------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
426 |
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
|
427 $ 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
|
428 > --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
|
429 > -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
|
430 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
431 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
432 TODO client spews a stack due to uncaught ValueError in batch.results() |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
433 #if no-chg |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
434 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
435 [1] |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
436 #else |
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
437 $ hg clone http://localhost:$HGPORT/ clone 2> /dev/null |
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
438 [255] |
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
439 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
440 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
441 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
442 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
443 $ 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
|
444 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
|
445 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
446 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
|
447 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
448 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
|
449 readline(*) -> (2) \r\n (glob) |
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
|
450 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
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
|
451 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
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
|
452 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
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
|
453 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
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
|
454 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
455 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
456 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
457 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
458 write(21) -> Content-Length: 431\r\n (no-py3 !) |
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
|
459 write(2) -> \r\n (no-py3 !) |
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
|
460 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
461 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
|
462 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
463 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
|
464 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
|
465 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
|
466 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
|
467 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
468 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
|
469 readline(*) -> (2) \r\n (glob) |
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
|
470 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py36 !) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
471 sendall(24 from 42) -> (0) 96ee1d7354c4ad7372047672 (py36 !) |
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
|
472 write(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py3 no-py36 !) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
473 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672 (py3 no-py36 !) |
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
|
474 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
475 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
476 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
477 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
478 write(20) -> Content-Length: 42\r\n (no-py3 !) |
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
|
479 write(2) -> \r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
480 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672 (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
481 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
482 $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
|
483 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
484 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
|
485 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
486 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
487 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
488 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
489 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
|
490 ------------------------------------------------------ |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
491 |
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
|
492 $ 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
|
493 > --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
|
494 > -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
|
495 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
496 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
497 TODO this output is terrible |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
498 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
499 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
500 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
501 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
|
502 ---%<--- (application/mercuri) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
503 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
504 ---%<--- |
45906
95c4cca641f6
errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents:
45839
diff
changeset
|
505 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
506 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
507 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
508 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
509 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
510 $ 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
|
511 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
|
512 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
513 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
|
514 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
515 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
|
516 readline(*) -> (2) \r\n (glob) |
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
|
517 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
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
|
518 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
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
|
519 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
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
|
520 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
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
|
521 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
522 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
523 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
524 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
525 write(21) -> Content-Length: 431\r\n (no-py3 !) |
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
|
526 write(2) -> \r\n (no-py3 !) |
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
|
527 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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(~) -> (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
|
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) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
531 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
|
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) |
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
|
537 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py36 !) |
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
|
538 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !) |
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
|
539 write(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py3 no-py36 !) |
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
|
540 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py3 no-py36 !) |
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
|
541 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
542 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
543 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
544 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
545 write(20) -> Content-Length: 42\r\n (no-py3 !) |
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
|
546 write(2) -> \r\n (no-py3 !) |
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
|
547 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !) |
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
|
548 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
|
549 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
550 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
551 readline(*) -> (440) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob) |
41465
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
552 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
|
553 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
|
554 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
555 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
|
556 readline(*) -> (2) \r\n (glob) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
557 sendall(129 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercuri (py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
558 write(129 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercuri (py3 no-py36 !) |
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
|
559 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
560 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
561 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
562 write(33 from 41) -> (0) Content-Type: application/mercuri (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
563 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
564 $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
|
565 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
566 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
|
567 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
568 write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
569 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
570 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
571 |
39484
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
572 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
|
573 ---------------------------------------------- |
39484
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
574 |
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
|
575 $ 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
|
576 > --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
|
577 > -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
|
578 $ cat hg.pid > $DAEMON_PIDS |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
579 |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
580 $ 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
|
581 requesting all changes |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
582 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
|
583 [255] |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
584 |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
585 $ killdaemons.py $DAEMON_PIDS |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
586 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
587 #if py36 |
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
|
588 $ "$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
|
589 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
|
590 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
|
591 $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
|
592 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
|
593 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
|
594 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
595 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
596 #else |
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
|
597 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -7 |
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
|
598 write(41) -> Content-Type: application/mercurial-0.2\r\n |
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
|
599 write(25 from 28) -> (0) Transfer-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
|
600 write limit reached; closing socket |
48611
f91f98e9834a
test-http-bad-server: unify log printing for `sendall` and `write`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48608
diff
changeset
|
601 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/?cmd=getbundle': (glob) |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
602 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
603 Exception: connection closed after sending N bytes |
48611
f91f98e9834a
test-http-bad-server: unify log printing for `sendall` and `write`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48608
diff
changeset
|
604 write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 !) |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
605 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
606 #endif |
39484
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
607 |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
608 $ rm -f error.log |
98995b689e03
httppeer: use util.readexactly() to abort on incomplete responses
Anton Shestakov <av6@dwimlabs.net>
parents:
39483
diff
changeset
|
609 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
610 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
|
611 ------------------------------------------ |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
612 |
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
|
613 $ 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
|
614 > --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
|
615 > -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
|
616 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
617 |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
618 $ 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
|
619 requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
620 abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
621 (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
|
622 [255] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
623 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
624 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
625 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
626 $ 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
|
627 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
|
628 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
629 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
|
630 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
631 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
|
632 readline(*) -> (2) \r\n (glob) |
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
|
633 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
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
|
634 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
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
|
635 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
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
|
636 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
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
|
637 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
638 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
639 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
640 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
641 write(21) -> Content-Length: 431\r\n (no-py3 !) |
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
|
642 write(2) -> \r\n (no-py3 !) |
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
|
643 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
644 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
|
645 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
646 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
|
647 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
|
648 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
|
649 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
|
650 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
651 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
|
652 readline(*) -> (2) \r\n (glob) |
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
|
653 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py36 !) |
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
|
654 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !) |
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
|
655 write(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py3 no-py36 !) |
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
|
656 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py3 no-py36 !) |
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
|
657 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
658 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
659 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
660 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
661 write(20) -> Content-Length: 42\r\n (no-py3 !) |
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
|
662 write(2) -> \r\n (no-py3 !) |
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
|
663 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !) |
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
|
664 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
|
665 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
666 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
667 readline(*) -> (440) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob) |
41465
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
668 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
|
669 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
|
670 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
671 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
|
672 readline(*) -> (2) \r\n (glob) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
673 sendall(167 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py36 !) |
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
674 write(167 from 167) -> (0) HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) |
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
|
675 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
676 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
677 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
678 write(41) -> Content-Type: application/mercurial-0.2\r\n (no-py3 !) |
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
|
679 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
680 write(2 from 2) -> (0) \r\n (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
681 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
682 $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
|
683 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
684 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
|
685 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
686 write(293) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.2\r\nTransfer-Encoding: chunked\r\n\r\nHTTP/1.1 500 Internal Server Error\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nTransfer-Encoding: chunked\r\n\r\n (py3 no-py36 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
687 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
688 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
689 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
690 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
|
691 --------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
692 |
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
|
693 $ 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
|
694 > --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
|
695 > -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
|
696 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
697 |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
698 $ 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
|
699 requesting all changes |
35268
44b8b5ad30eb
pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35259
diff
changeset
|
700 abort: HTTP request error (incomplete response) |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
701 (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
|
702 [255] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
703 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
704 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
705 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
706 $ 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
|
707 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
|
708 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
709 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
|
710 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
711 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
|
712 readline(*) -> (2) \r\n (glob) |
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
|
713 sendall(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py36 !) |
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
|
714 sendall(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py36 !) |
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
|
715 write(160) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 431\r\n\r\n (py3 no-py36 !) |
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
|
716 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (py3 no-py36 !) |
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
|
717 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
718 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
719 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
720 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
721 write(21) -> Content-Length: 431\r\n (no-py3 !) |
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
|
722 write(2) -> \r\n (no-py3 !) |
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
|
723 write(431) -> batch branchmap $USUAL_BUNDLE2_CAPS_NO_PHASES$ changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash (no-py3 !) |
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
|
724 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
|
725 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
726 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
|
727 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
|
728 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
|
729 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
|
730 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
731 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
|
732 readline(*) -> (2) \r\n (glob) |
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
|
733 sendall(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py36 !) |
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
|
734 sendall(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (py36 !) |
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
|
735 write(159) -> HTTP/1.1 200 Script output follows\r\nServer: badhttpserver\r\nDate: $HTTP_DATE$\r\nContent-Type: application/mercurial-0.1\r\nContent-Length: 42\r\n\r\n (py3 no-py36 !) |
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
|
736 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
737 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
738 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
739 write(41) -> Content-Type: application/mercurial-0.1\r\n (no-py3 !) |
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
|
740 write(20) -> Content-Length: 42\r\n (no-py3 !) |
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
|
741 write(2) -> \r\n (no-py3 !) |
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
|
742 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; (no-py3 !) |
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
|
743 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
|
744 readline(*) -> (27) Accept-Encoding: identity\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
745 readline(*) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
746 readline(*) -> (440) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n (glob) |
41465
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
747 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
|
748 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
|
749 readline(*) -> (2?) host: localhost:$HGPORT\r\n (glob) |
33560f3bbcd3
tests: glob away readline(-1)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41462
diff
changeset
|
750 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
|
751 readline(*) -> (2) \r\n (glob) |
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
|
752 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 (py36 !) |
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
|
753 sendall(6) -> 1\\r\\n\x04\\r\\n (esc) (py36 !) |
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
|
754 sendall(9) -> 4\r\nnone\r\n (py36 !) |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
755 sendall(9 from 9) -> (0) 4\r\nHG20\r\n (py36 !) |
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
|
756 write(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 (py3 no-py36 !) |
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
|
757 write(36) -> HTTP/1.1 200 Script output follows\r\n (no-py3 !) |
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
|
758 write(23) -> Server: badhttpserver\r\n (no-py3 !) |
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
|
759 write(37) -> Date: $HTTP_DATE$\r\n (no-py3 !) |
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
|
760 write(41) -> Content-Type: application/mercurial-0.2\r\n (no-py3 !) |
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
|
761 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
762 write(2) -> \r\n (no-py3 !) |
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
|
763 write(6) -> 1\\r\\n\x04\\r\\n (esc) (no-py3 !) |
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
|
764 write(9) -> 4\r\nnone\r\n (no-py3 !) |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
765 write(9 from 9) -> (0) 4\r\nHG20\r\n (no-py3 !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
766 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
767 $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
|
768 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
769 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
|
770 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
771 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
772 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
773 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
774 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
|
775 ----------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
776 |
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
|
777 $ 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
|
778 > --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
|
779 > -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
780 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
781 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
782 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
783 requesting all changes |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
784 abort: HTTP request error (incomplete response) (py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
785 abort: HTTP request error (incomplete response; expected 4 bytes got 3) (no-py3 !) |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
786 (this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
787 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
788 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
789 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
790 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
791 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
792 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -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
|
793 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
|
794 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
|
795 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
|
796 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
|
797 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
|
798 $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
|
799 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
|
800 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
|
801 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
802 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
803 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
804 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -11 |
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
|
805 readline(~) -> (2) \r\n (py3 !) |
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
|
806 write(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 (py3 !) |
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
|
807 write(41) -> Content-Type: application/mercurial-0.2\r\n (no-py3 !) |
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
|
808 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
809 write(2) -> \r\n (no-py3 !) |
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
|
810 write(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
|
811 write(9) -> 4\r\nnone\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
812 write(6 from 9) -> (0) 4\r\nHG2 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
813 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
814 $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
|
815 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
816 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
|
817 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
818 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
819 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
820 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
821 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
822 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
|
823 ---------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
824 |
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
|
825 $ 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
|
826 > --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
|
827 > -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
|
828 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
829 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
830 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
831 requesting all changes |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
832 abort: HTTP request error (incomplete response) (py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
833 abort: HTTP request error (incomplete response; expected 4 bytes got 3) (no-py3 !) |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
834 (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
|
835 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
836 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
837 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
838 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
839 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
840 $ "$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
|
841 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
|
842 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
|
843 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
|
844 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
|
845 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
|
846 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
|
847 $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
|
848 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
|
849 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
|
850 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
851 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
852 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
853 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12 |
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
|
854 readline(~) -> (2) \r\n (py3 !) |
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
|
855 write(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 (py3 !) |
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
|
856 write(41) -> Content-Type: application/mercurial-0.2\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
|
857 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
858 write(2) -> \r\n (no-py3 !) |
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
|
859 write(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
|
860 write(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
|
861 write(9) -> 4\r\nHG20\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
862 write(6 from 9) -> (0) 4\\r\\n\x00\x00\x00 (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
863 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
864 $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
|
865 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
866 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
|
867 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
868 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
869 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
870 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
871 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
872 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
|
873 ------------------------------------------------ |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
874 |
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
|
875 $ 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
|
876 > --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
|
877 > -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
|
878 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
879 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
880 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
881 requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
882 abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
883 (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
|
884 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
885 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
886 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
887 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
888 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
889 $ "$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
|
890 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
|
891 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
|
892 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
|
893 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
|
894 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
|
895 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
|
896 $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
|
897 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
|
898 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
|
899 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
900 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
901 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
902 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -12 |
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
|
903 readline(~) -> (2) \r\n (py3 !) |
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
|
904 write(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 (py3 !) |
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
|
905 write(41) -> Content-Type: application/mercurial-0.2\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
|
906 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
907 write(2) -> \r\n (no-py3 !) |
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
|
908 write(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
|
909 write(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
|
910 write(9) -> 4\r\nHG20\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
911 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
912 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
913 $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
|
914 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
915 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
|
916 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
917 #endif |
32001
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 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
920 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
921 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
|
922 ----------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
923 |
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
|
924 $ 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
|
925 > --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
|
926 > -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
|
927 $ cat hg.pid > $DAEMON_PIDS |
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 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
930 requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
931 abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
932 (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
|
933 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
934 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
935 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
936 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
937 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
938 $ "$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
|
939 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
|
940 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
|
941 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
|
942 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
|
943 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
|
944 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
|
945 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
|
946 $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
|
947 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
|
948 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
|
949 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
950 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
951 #else |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
952 |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
953 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -13 |
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
|
954 readline(~) -> (2) \r\n (py3 !) |
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
|
955 write(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 (py3 !) |
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
|
956 write(41) -> Content-Type: application/mercurial-0.2\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
|
957 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
958 write(2) -> \r\n (no-py3 !) |
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
|
959 write(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
|
960 write(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
|
961 write(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
|
962 write(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
963 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
964 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
965 $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
|
966 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
967 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
|
968 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
969 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
970 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
971 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
972 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
973 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
|
974 ---------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
975 |
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
|
976 $ hg serve \ |
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
|
977 > --config badserver.close-after-send-patterns="version02nbchanges1\\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
|
978 > -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
979 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
980 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
981 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
982 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
983 adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
984 transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
985 rollback completed |
32024
ad41739c6b2b
bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32022
diff
changeset
|
986 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
|
987 (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
|
988 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
989 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
990 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
991 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
992 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
993 $ "$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
|
994 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
|
995 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
|
996 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
|
997 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
|
998 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
|
999 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
|
1000 sendall(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1001 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
|
1002 $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
|
1003 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
|
1004 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
|
1005 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1006 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1007 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1008 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -14 |
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
|
1009 readline(~) -> (2) \r\n (py3 !) |
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
|
1010 write(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 (py3 !) |
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
|
1011 write(41) -> Content-Type: application/mercurial-0.2\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
|
1012 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
1013 write(2) -> \r\n (no-py3 !) |
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
|
1014 write(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
|
1015 write(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
|
1016 write(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
|
1017 write(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
|
1018 write(9) -> 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1019 write(47 from 47) -> (0) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1020 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1021 $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
|
1022 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1023 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
|
1024 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1025 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1026 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1027 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1028 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1029 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
|
1030 -------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1031 |
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
|
1032 $ hg serve \ |
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
|
1033 > --config badserver.close-after-send-patterns='1d2\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
|
1034 > -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
|
1035 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1036 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1037 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1038 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1039 adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1040 transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1041 rollback completed |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1042 abort: HTTP request error (incomplete response) (py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1043 abort: HTTP request error (incomplete response; expected 466 bytes got 7) (no-py3 !) |
32024
ad41739c6b2b
bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32022
diff
changeset
|
1044 (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
|
1045 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1046 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1047 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1048 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
1049 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1050 $ "$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
|
1051 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
|
1052 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
|
1053 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
|
1054 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
|
1055 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
|
1056 sendall(9) -> 4\\r\\n\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
|
1057 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1058 sendall(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1059 sendall(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1060 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
|
1061 $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
|
1062 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
|
1063 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
|
1064 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1065 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1066 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1067 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -15 |
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
|
1068 write(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 (py3 !) |
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
|
1069 write(28) -> Transfer-Encoding: chunked\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
|
1070 write(2) -> \r\n (no-py3 !) |
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
|
1071 write(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
|
1072 write(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
|
1073 write(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
|
1074 write(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
|
1075 write(9) -> 4\\r\\n\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
|
1076 write(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1077 write(9) -> 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
35268
44b8b5ad30eb
pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35259
diff
changeset
|
1078 write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1079 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1080 $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
|
1081 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1082 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
|
1083 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1084 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1085 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1086 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1087 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1088 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
|
1089 ------------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1090 |
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
|
1091 $ hg serve \ |
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
|
1092 > --config badserver.close-after-send-patterns=':jL\0\0\x00\0\0\0\0\0\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
|
1093 > -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
|
1094 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1095 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1096 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1097 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1098 adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1099 transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1100 rollback completed |
32024
ad41739c6b2b
bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32022
diff
changeset
|
1101 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
|
1102 (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
|
1103 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1104 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1105 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1106 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
1107 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1108 $ "$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
|
1109 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
|
1110 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
|
1111 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
|
1112 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
|
1113 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
|
1114 sendall(9) -> 4\\r\\n\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
|
1115 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1116 sendall(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1117 sendall(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1118 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
|
1119 $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
|
1120 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
|
1121 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
|
1122 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1123 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1124 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1125 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -16 |
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
|
1126 readline(~) -> (2) \r\n (py3 !) |
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
|
1127 write(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 (py3 !) |
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
|
1128 write(41) -> Content-Type: application/mercurial-0.2\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
|
1129 write(28) -> Transfer-Encoding: chunked\r\n (no-py3 !) |
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
|
1130 write(2) -> \r\n (no-py3 !) |
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
|
1131 write(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
|
1132 write(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
|
1133 write(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
|
1134 write(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
|
1135 write(9) -> 4\\r\\n\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
|
1136 write(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1137 write(9) -> 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1138 write(473 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1139 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1140 $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
|
1141 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1142 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
|
1143 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1144 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1145 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1146 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1147 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1148 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
|
1149 ------------------------------------------------------ |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1150 |
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
|
1151 $ 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
|
1152 > --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
|
1153 > -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
|
1154 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1155 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1156 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1157 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1158 adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1159 adding manifests |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1160 adding file changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1161 transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1162 rollback completed |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1163 abort: HTTP request error (incomplete response) (py3 !) |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1164 abort: HTTP request error (incomplete response; expected 32 bytes got 9) (no-py3 !) |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
1165 (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
|
1166 [255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1167 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1168 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1169 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
1170 #if py36 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1171 $ "$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
|
1172 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
|
1173 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
|
1174 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
|
1175 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
|
1176 sendall(9) -> 4\\r\\n\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
|
1177 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1178 sendall(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1179 sendall(473) -> 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
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
|
1180 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
|
1181 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
|
1182 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
|
1183 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
|
1184 $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
|
1185 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
|
1186 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
|
1187 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1188 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1189 #else |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1190 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -17 |
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
|
1191 write(2) -> \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
|
1192 write(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
|
1193 write(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
|
1194 write(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
|
1195 write(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
|
1196 write(9) -> 4\\r\\n\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
|
1197 write(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1198 write(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1199 write(473) -> 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
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
|
1200 write(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
|
1201 write(9) -> 4\\r\\n\x00\x00\x00 \\r\\n (esc) |
35268
44b8b5ad30eb
pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents:
35259
diff
changeset
|
1202 write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1203 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1204 $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
|
1205 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1206 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
|
1207 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1208 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1209 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1210 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1211 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1212 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
|
1213 ---------------------------------------------------------------------------------------- |
89485747b8f7
test-http-bad-server: highlight each test with section
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48606
diff
changeset
|
1214 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1215 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
|
1216 |
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
|
1217 $ 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
|
1218 > --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
|
1219 > -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
|
1220 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1221 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1222 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1223 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1224 adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1225 adding manifests |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1226 adding file changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1227 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
|
1228 new changesets 96ee1d7354c4 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1229 updating to branch default |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1230 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
|
1231 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1232 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1233 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
1234 #if py36 |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
1235 $ "$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
|
1236 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
|
1237 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
|
1238 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1239 sendall(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1240 sendall(473) -> 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
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
|
1241 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
|
1242 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
|
1243 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
|
1244 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
|
1245 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
|
1246 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
|
1247 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
|
1248 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
|
1249 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
|
1250 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
|
1251 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
|
1252 $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
|
1253 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
|
1254 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
|
1255 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1256 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1257 #else |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
1258 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -21 |
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
|
1259 write(9) -> 4\r\nHG20\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
|
1260 write(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
|
1261 write(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
|
1262 write(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1263 write(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1264 write(473) -> 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
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
|
1265 write(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
|
1266 write(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
|
1267 write(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
|
1268 write(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
|
1269 write(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
|
1270 write(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
|
1271 write(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
|
1272 write(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
|
1273 write(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1274 write(9 from 9) -> (0) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1275 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1276 $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
|
1277 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1278 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
|
1279 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1280 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1281 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1282 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1283 $ rm -rf clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1284 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1285 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
|
1286 -------------------------------------------------------------------- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1287 |
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
|
1288 $ 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
|
1289 > --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
|
1290 > -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
|
1291 $ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1292 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1293 $ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1294 requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1295 adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1296 adding manifests |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1297 adding file changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1298 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
|
1299 new changesets 96ee1d7354c4 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1300 updating to branch default |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1301 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
|
1302 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1303 $ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1304 |
41467
1016b81fa43e
tests: conditionalize test-http-bad-server.t for Python 3.5
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41466
diff
changeset
|
1305 #if py36 |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
1306 $ "$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
|
1307 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
|
1308 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
|
1309 sendall(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1310 sendall(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1311 sendall(473) -> 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
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
|
1312 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
|
1313 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
|
1314 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
|
1315 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
|
1316 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
|
1317 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
|
1318 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
|
1319 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
|
1320 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
|
1321 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
|
1322 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
|
1323 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
|
1324 $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
|
1325 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
|
1326 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
|
1327 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1328 |
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1329 #else |
46633
7015b0232c5e
exchange: stop advertising rev-branch-cache bundle capability
Joerg Sonnenberger <joerg@bec.de>
parents:
45906
diff
changeset
|
1330 $ "$PYTHON" $TESTDIR/filtertraceback.py < error.log | tail -22 |
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
|
1331 write(9) -> 4\r\nHG20\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
|
1332 write(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
|
1333 write(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
|
1334 write(47) -> 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\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
|
1335 write(9) -> 4\\r\\n\x00\x00\x01\xd2\\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
|
1336 write(473) -> 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
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
|
1337 write(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
|
1338 write(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
|
1339 write(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
|
1340 write(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
|
1341 write(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
|
1342 write(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
|
1343 write(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
|
1344 write(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
|
1345 write(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
|
1346 write(9) -> 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1347 write(3 from 5) -> (0) 0\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1348 write limit reached; closing socket |
41462
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1349 $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
|
1350 Traceback (most recent call last): |
9b2b8794f801
hgweb: log error before attempting I/O
Gregory Szorc <gregory.szorc@gmail.com>
parents:
40982
diff
changeset
|
1351 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
|
1352 |
41466
4d5aae86c9bd
tests: log sendall() operations and port test-http-bad-server.t
Gregory Szorc <gregory.szorc@gmail.com>
parents:
41465
diff
changeset
|
1353 #endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1354 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1355 $ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1356 $ rm -rf clone |