author | Augie Fackler <augie@google.com> |
Sat, 14 Oct 2017 11:59:51 -0400 | |
changeset 34724 | 9c3dcaf648ef |
parent 34661 | eb586ed5d8ce |
child 35074 | 62e10bf001a9 |
permissions | -rw-r--r-- |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 |
#require killdaemons serve zstd |
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 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 |
> util.version = lambda: '4.2' |
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 |
34322
10e162bb9bf5
pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents:
34308
diff
changeset
|
14 |
> [devel] |
10e162bb9bf5
pull: use 'phase-heads' to retrieve phase information
Boris Feld <boris.feld@octobus.net>
parents:
34308
diff
changeset
|
15 |
> legacy.exchange = phases |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 |
> EOF |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
$ hg init server0 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 |
$ cd server0 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 |
$ touch foo |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 |
$ hg -q commit -A -m initial |
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 |
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
|
24 |
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
|
25 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 |
$ cat > .hg/hgrc << EOF |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 |
> [extensions] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 |
> badserver = $TESTDIR/badserverext.py |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 |
> [server] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 |
> compressionengines = none |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 |
> EOF |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 |
Failure to accept() socket should result in connection related error message |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
35 |
$ hg serve --config badserver.closebeforeaccept=true -p $HGPORT -d --pid-file=hg.pid |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |
$ cat hg.pid > $DAEMON_PIDS |
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 |
$ hg clone http://localhost:$HGPORT/ clone |
32020
acc67cd7f508
test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
32002
diff
changeset
|
39 |
abort: error: Connection reset by peer (no-windows !) |
acc67cd7f508
test-http-bad-server: conditionalize error output for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
32002
diff
changeset
|
40 |
abort: error: An existing connection was forcibly closed by the remote host (windows !) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
42 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 |
(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
|
44 |
So ensure the process is dead.) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 |
$ killdaemons.py $DAEMON_PIDS |
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 |
Failure immediately after accept() should yield connection related error message |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
50 |
$ hg serve --config badserver.closeafteraccept=true -p $HGPORT -d --pid-file=hg.pid |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 |
|
32064
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
53 |
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
|
54 |
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
|
55 |
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
|
56 |
|
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
57 |
abort: error: Connection reset by peer (no-windows !) |
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
58 |
abort: error: An existing connection was forcibly closed by the remote host (windows !) |
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
59 |
|
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
60 |
The flakiness in this output was observable easily with |
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
61 |
--runs-per-test=20 on macOS 10.12 during the freeze for 4.2. |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 |
$ hg clone http://localhost:$HGPORT/ clone |
32064
f82cdd5ee57e
tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents:
32024
diff
changeset
|
63 |
abort: error: * (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 |
Failure to read all bytes in initial HTTP request should yield connection related error message |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
69 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
70 |
$ hg serve --config badserver.closeafterrecvbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
71 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 |
$ hg clone http://localhost:$HGPORT/ clone |
34308
9bd003052d55
keepalive: add more context to bad status line errors
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32319
diff
changeset
|
74 |
abort: error: bad HTTP status line: '' |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
77 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
79 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
80 |
readline(1 from 65537) -> (1) G |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
81 |
read limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
82 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
83 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
84 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
85 |
Same failure, but server reads full HTTP request line |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
86 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
87 |
$ hg serve --config badserver.closeafterrecvbytes=40 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
88 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
89 |
$ hg clone http://localhost:$HGPORT/ clone |
34308
9bd003052d55
keepalive: add more context to bad status line errors
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32319
diff
changeset
|
90 |
abort: error: bad HTTP status line: '' |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
91 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
92 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
93 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
94 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
95 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
96 |
readline(40 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
97 |
readline(7 from -1) -> (7) Accept- |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
98 |
read limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
99 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
100 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
101 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
102 |
Failure on subsequent HTTP request on the same socket (cmd?batch) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
103 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
104 |
$ hg serve --config badserver.closeafterrecvbytes=210 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
105 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
106 |
$ hg clone http://localhost:$HGPORT/ clone |
34308
9bd003052d55
keepalive: add more context to bad status line errors
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32319
diff
changeset
|
107 |
abort: error: bad HTTP status line: '' |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
108 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
109 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
110 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
111 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
112 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
113 |
readline(210 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
114 |
readline(177 from -1) -> (27) Accept-Encoding: identity\r\n |
32022
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
115 |
readline(150 from -1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
116 |
readline(115 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
117 |
readline(9? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
118 |
readline(4? from -1) -> (2) \r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
119 |
write(36) -> HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
120 |
write(23) -> Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
121 |
write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
122 |
write(41) -> Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
123 |
write(21) -> Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
124 |
write(2) -> \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
125 |
write(405) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32319
d3177aecac01
test-http-bad-server: match different in output
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
32282
diff
changeset
|
126 |
readline(4? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob) |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
127 |
readline(1? from -1) -> (1?) Accept-Encoding* (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
128 |
read limit reached; closing socket |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
129 |
readline(210 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
130 |
readline(184 from -1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
131 |
readline(157 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
132 |
readline(128 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
133 |
readline(87 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
134 |
readline(39 from -1) -> (35) accept: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
135 |
readline(4 from -1) -> (4) host |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
136 |
read limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
137 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
138 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
139 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
140 |
Failure to read getbundle HTTP request |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
141 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
142 |
$ hg serve --config badserver.closeafterrecvbytes=292 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
143 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
144 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
145 |
requesting all changes |
34308
9bd003052d55
keepalive: add more context to bad status line errors
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32319
diff
changeset
|
146 |
abort: error: bad HTTP status line: '' |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
147 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
148 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
149 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
150 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
151 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
152 |
readline(292 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32022
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
153 |
readline(259 from -1) -> (27) Accept-Encoding: identity\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
154 |
readline(232 from -1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
155 |
readline(197 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
156 |
readline(17? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
157 |
readline(12? from -1) -> (2) \r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
158 |
write(36) -> HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
159 |
write(23) -> Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
160 |
write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
161 |
write(41) -> Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
162 |
write(21) -> Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
163 |
write(2) -> \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
164 |
write(405) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
165 |
readline\(12[34] from 65537\) -> \(2[67]\) GET /\?cmd=batch HTTP/1.1\\r\\n (re) |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
166 |
readline(9? from -1) -> (27) Accept-Encoding: identity\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
167 |
readline(7? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
168 |
readline(4? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
169 |
readline(1 from -1) -> (1) x (?) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
170 |
read limit reached; closing socket |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
171 |
readline(292 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32022
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
172 |
readline(266 from -1) -> (27) Accept-Encoding: identity\r\n |
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
173 |
readline(239 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
174 |
readline(210 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
175 |
readline(169 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
176 |
readline(121 from -1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
177 |
readline(86 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
178 |
readline(6? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
179 |
readline(1? from -1) -> (2) \r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
180 |
write(36) -> HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
181 |
write(23) -> Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
182 |
write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
183 |
write(41) -> Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
184 |
write(20) -> Content-Length: 42\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
185 |
write(2) -> \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
186 |
write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
187 |
readline\(1[23] from 65537\) -> \(1[23]\) GET /\?cmd=ge.? (re) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
188 |
read limit reached; closing socket |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
189 |
readline(292 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
32022
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
190 |
readline(262 from -1) -> (27) Accept-Encoding: identity\r\n |
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
191 |
readline(235 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
192 |
readline(206 from -1) -> (206) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Ali |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
193 |
read limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
194 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
195 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
196 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
197 |
Now do a variation using POST to send arguments |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
198 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
199 |
$ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=315 -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
|
200 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
201 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
202 |
$ 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
|
203 |
abort: error: bad HTTP status line: '' |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
204 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
205 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
206 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
207 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
208 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
209 |
readline(315 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
210 |
readline(282 from -1) -> (27) Accept-Encoding: identity\r\n |
32022
e5d7f99a3063
httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32020
diff
changeset
|
211 |
readline(255 from -1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
212 |
readline(220 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
213 |
readline(19? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
214 |
readline(14? from -1) -> (2) \r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
215 |
write(36) -> HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
216 |
write(23) -> Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
217 |
write(37) -> Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
218 |
write(41) -> Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
219 |
write(21) -> Content-Length: 418\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
220 |
write(2) -> \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
221 |
write(418) -> lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httppostargs httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
222 |
readline\(14[67] from 65537\) -> \(2[67]\) POST /\?cmd=batch HTTP/1.1\\r\\n (re) |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
223 |
readline\(1(19|20) from -1\) -> \(27\) Accept-Encoding: identity\\r\\n (re) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
224 |
readline(9? from -1) -> (41) content-type: application/mercurial-0.1\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
225 |
readline(5? from -1) -> (19) vary: X-HgProto-1\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
226 |
readline(3? from -1) -> (19) x-hgargs-post: 28\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
227 |
readline(1? from -1) -> (1?) x-hgproto-1: * (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
228 |
read limit reached; closing socket |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
229 |
readline(315 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
230 |
readline(288 from -1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
231 |
readline(261 from -1) -> (41) content-type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
232 |
readline(220 from -1) -> (19) vary: X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
233 |
readline(201 from -1) -> (19) x-hgargs-post: 28\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
234 |
readline(182 from -1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
235 |
readline(134 from -1) -> (35) accept: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
236 |
readline(99 from -1) -> (20) content-length: 28\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
237 |
readline(79 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
238 |
readline(5? from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
239 |
readline(? from -1) -> (2) \r\n (glob) |
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
240 |
read(? from 28) -> (?) cmds=* (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
241 |
read limit reached, closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
242 |
write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
243 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
244 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
245 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
246 |
Now move on to partial server responses |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
247 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
248 |
Server sends a single character from the HTTP response line |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
249 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
250 |
$ hg serve --config badserver.closeaftersendbytes=1 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
251 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
252 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
253 |
$ 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
|
254 |
abort: error: bad HTTP status line: H |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
255 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
256 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
257 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
258 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
259 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
260 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
261 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
262 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
263 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
264 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
265 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
266 |
write(1 from 36) -> (0) H |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
267 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
268 |
write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
269 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
270 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
271 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
272 |
Server sends an incomplete capabilities response body |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
273 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
274 |
$ hg serve --config badserver.closeaftersendbytes=180 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
275 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
276 |
|
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
277 |
$ hg clone http://localhost:$HGPORT/ clone |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
278 |
abort: HTTP request error (incomplete response; expected 385 bytes got 20) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
279 |
(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
|
280 |
[255] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
281 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
282 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
283 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
284 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
285 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
286 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
287 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
288 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
289 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
290 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
291 |
write(36 from 36) -> (144) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
292 |
write(23 from 23) -> (121) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
293 |
write(37 from 37) -> (84) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
294 |
write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
295 |
write(21 from 21) -> (22) Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
296 |
write(2 from 2) -> (20) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
297 |
write(20 from 405) -> (0) lookup changegroupsu |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
298 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
299 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
300 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
301 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
302 |
Server sends incomplete headers for batch request |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
303 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
304 |
$ hg serve --config badserver.closeaftersendbytes=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
|
305 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
306 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
307 |
TODO this output is horrible |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
308 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
309 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
310 |
abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository: |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
311 |
---%<--- (application/mercuria) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
312 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
313 |
---%<--- |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
314 |
! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
315 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
316 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
317 |
$ killdaemons.py $DAEMON_PIDS |
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 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
320 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
321 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
322 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
323 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
324 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
325 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
326 |
write(36 from 36) -> (659) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
327 |
write(23 from 23) -> (636) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
328 |
write(37 from 37) -> (599) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
329 |
write(41 from 41) -> (558) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
330 |
write(21 from 21) -> (537) Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
331 |
write(2 from 2) -> (535) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
332 |
write(405 from 405) -> (130) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
333 |
readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
334 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
335 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
336 |
readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
337 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
338 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
339 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
340 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
341 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
342 |
write(36 from 36) -> (94) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
343 |
write(23 from 23) -> (71) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
344 |
write(37 from 37) -> (34) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
345 |
write(34 from 41) -> (0) Content-Type: application/mercuria |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
346 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
347 |
write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
348 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
349 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
350 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
351 |
Server sends an incomplete HTTP response body to batch request |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
352 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
353 |
$ hg serve --config badserver.closeaftersendbytes=760 -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
|
354 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
355 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
356 |
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
|
357 |
#if no-chg |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
358 |
$ 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
|
359 |
[1] |
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
360 |
#else |
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
361 |
$ 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
|
362 |
[255] |
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
363 |
#endif |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
364 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
365 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
366 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
367 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
368 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
369 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
370 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
371 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
372 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
373 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
374 |
write(36 from 36) -> (724) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
375 |
write(23 from 23) -> (701) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
376 |
write(37 from 37) -> (664) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
377 |
write(41 from 41) -> (623) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
378 |
write(21 from 21) -> (602) Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
379 |
write(2 from 2) -> (600) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
380 |
write(405 from 405) -> (195) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
381 |
readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
382 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
383 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
384 |
readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
385 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
386 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
387 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
388 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
389 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
390 |
write(36 from 36) -> (159) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
391 |
write(23 from 23) -> (136) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
392 |
write(37 from 37) -> (99) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
393 |
write(41 from 41) -> (58) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
394 |
write(20 from 20) -> (38) Content-Length: 42\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
395 |
write(2 from 2) -> (36) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
396 |
write(36 from 42) -> (0) 96ee1d7354c4ad7372047672c36a1f561e3a |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
397 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
398 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
399 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
400 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
401 |
Server sends incomplete headers for getbundle response |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
402 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
403 |
$ hg serve --config badserver.closeaftersendbytes=895 -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
|
404 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
405 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
406 |
TODO this output is terrible |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
407 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
408 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
409 |
requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
410 |
abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository: |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
411 |
---%<--- (application/mercuri) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
412 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
413 |
---%<--- |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
414 |
! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
415 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
416 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
417 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
418 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
419 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
420 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
421 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
422 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
423 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
424 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
425 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
426 |
write(36 from 36) -> (859) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
427 |
write(23 from 23) -> (836) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
428 |
write(37 from 37) -> (799) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
429 |
write(41 from 41) -> (758) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
430 |
write(21 from 21) -> (737) Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
431 |
write(2 from 2) -> (735) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
432 |
write(405 from 405) -> (330) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
433 |
readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
434 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
435 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
436 |
readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
437 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
438 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
439 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
440 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
441 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
442 |
write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
443 |
write(23 from 23) -> (271) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
444 |
write(37 from 37) -> (234) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
445 |
write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
446 |
write(20 from 20) -> (173) Content-Length: 42\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
447 |
write(2 from 2) -> (171) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
448 |
write(42 from 42) -> (129) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
449 |
readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
450 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
451 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
452 |
readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
453 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
454 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
455 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
456 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
457 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
458 |
write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
459 |
write(23 from 23) -> (70) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
460 |
write(37 from 37) -> (33) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
461 |
write(33 from 41) -> (0) Content-Type: application/mercuri |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
462 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
463 |
write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
464 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
465 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
466 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
467 |
Server sends empty HTTP body for getbundle |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
468 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
469 |
$ hg serve --config badserver.closeaftersendbytes=933 -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
|
470 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
471 |
|
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
472 |
$ 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
|
473 |
requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
474 |
abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
475 |
(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
|
476 |
[255] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
477 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
478 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
479 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
480 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
481 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
482 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
483 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
484 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
485 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
486 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
487 |
write(36 from 36) -> (897) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
488 |
write(23 from 23) -> (874) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
489 |
write(37 from 37) -> (837) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
490 |
write(41 from 41) -> (796) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
491 |
write(21 from 21) -> (775) Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
492 |
write(2 from 2) -> (773) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
493 |
write(405 from 405) -> (368) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
494 |
readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
495 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
496 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
497 |
readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
498 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
499 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
500 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
501 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
502 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
503 |
write(36 from 36) -> (332) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
504 |
write(23 from 23) -> (309) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
505 |
write(37 from 37) -> (272) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
506 |
write(41 from 41) -> (231) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
507 |
write(20 from 20) -> (211) Content-Length: 42\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
508 |
write(2 from 2) -> (209) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
509 |
write(42 from 42) -> (167) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
510 |
readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
511 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
512 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
513 |
readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
514 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
515 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
516 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
517 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
518 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
519 |
write(36 from 36) -> (131) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
520 |
write(23 from 23) -> (108) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
521 |
write(37 from 37) -> (71) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
522 |
write(41 from 41) -> (30) Content-Type: application/mercurial-0.2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
523 |
write(28 from 28) -> (2) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
524 |
write(2 from 2) -> (0) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
525 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
526 |
write(36) -> HTTP/1.1 500 Internal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
527 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
528 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
529 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
530 |
Server sends partial compression string |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
531 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
532 |
$ hg serve --config badserver.closeaftersendbytes=945 -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
|
533 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
534 |
|
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
535 |
$ 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
|
536 |
requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
537 |
abort: HTTP request error (incomplete response; expected 1 bytes got 3) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
538 |
(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
|
539 |
[255] |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
540 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
541 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
542 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
543 |
$ cat error.log |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
544 |
readline(65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
545 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
546 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
547 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
548 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
549 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
550 |
write(36 from 36) -> (909) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
551 |
write(23 from 23) -> (886) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
552 |
write(37 from 37) -> (849) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
553 |
write(41 from 41) -> (808) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
554 |
write(21 from 21) -> (787) Content-Length: 405\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
555 |
write(2 from 2) -> (785) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
556 |
write(405 from 405) -> (380) lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch streamreqs=generaldelta,revlogv1 bundle2=HG20%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx compression=none |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
557 |
readline(65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
558 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
559 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
560 |
readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
561 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
562 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
563 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
564 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
565 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
566 |
write(36 from 36) -> (344) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
567 |
write(23 from 23) -> (321) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
568 |
write(37 from 37) -> (284) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
569 |
write(41 from 41) -> (243) Content-Type: application/mercurial-0.1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
570 |
write(20 from 20) -> (223) Content-Length: 42\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
571 |
write(2 from 2) -> (221) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
572 |
write(42 from 42) -> (179) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n; |
32282
0c0c9b12de52
tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32089
diff
changeset
|
573 |
readline(65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
574 |
readline(-1) -> (27) Accept-Encoding: identity\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
575 |
readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
576 |
readline(-1) -> (396) x-hgarg-1: bundlecaps=HG20%2Cbundle2%3DHG20%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
577 |
readline(-1) -> (48) x-hgproto-1: 0.1 0.2 comp=zstd,zlib,none,bzip2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
578 |
readline(-1) -> (35) accept: application/mercurial-0.1\r\n |
32089
f942dc80819f
test: glob out variation from 'HGPORT' length
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
32067
diff
changeset
|
579 |
readline(-1) -> (2?) host: localhost:$HGPORT\r\n (glob) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
580 |
readline(-1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
581 |
readline(-1) -> (2) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
582 |
write(36 from 36) -> (143) HTTP/1.1 200 Script output follows\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
583 |
write(23 from 23) -> (120) Server: badhttpserver\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
584 |
write(37 from 37) -> (83) Date: Fri, 14 Apr 2017 00:00:00 GMT\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
585 |
write(41 from 41) -> (42) Content-Type: application/mercurial-0.2\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
586 |
write(28 from 28) -> (14) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
587 |
write(2 from 2) -> (12) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
588 |
write(6 from 6) -> (6) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
589 |
write(6 from 9) -> (0) 4\r\nnon |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
590 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
591 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
592 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
593 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
594 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
595 |
Server sends partial bundle2 header magic |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
596 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
597 |
$ hg serve --config badserver.closeaftersendbytes=954 -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
|
598 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
599 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
600 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
601 |
requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
602 |
abort: HTTP request error (incomplete response; expected 1 bytes got 3) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
603 |
(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
|
604 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
605 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
606 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
607 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
608 |
$ tail -7 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
609 |
write(28 from 28) -> (23) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
610 |
write(2 from 2) -> (21) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
611 |
write(6 from 6) -> (15) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
612 |
write(9 from 9) -> (6) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
613 |
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
|
614 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
615 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
616 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
617 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
618 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
619 |
Server sends incomplete bundle2 stream params length |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
620 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
621 |
$ hg serve --config badserver.closeaftersendbytes=963 -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
|
622 |
$ cat hg.pid > $DAEMON_PIDS |
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 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
625 |
requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
626 |
abort: HTTP request error (incomplete response; expected 1 bytes got 3) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
627 |
(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
|
628 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
629 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
630 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
631 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
632 |
$ tail -8 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
633 |
write(28 from 28) -> (32) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
634 |
write(2 from 2) -> (30) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
635 |
write(6 from 6) -> (24) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
636 |
write(9 from 9) -> (15) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
637 |
write(9 from 9) -> (6) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
638 |
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
|
639 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
640 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
641 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
642 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
643 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
644 |
Servers stops after bundle2 stream params header |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
645 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
646 |
$ hg serve --config badserver.closeaftersendbytes=966 -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
|
647 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
648 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
649 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
650 |
requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
651 |
abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
652 |
(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
|
653 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
654 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
655 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
656 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
657 |
$ tail -8 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
658 |
write(28 from 28) -> (35) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
659 |
write(2 from 2) -> (33) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
660 |
write(6 from 6) -> (27) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
661 |
write(9 from 9) -> (18) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
662 |
write(9 from 9) -> (9) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
663 |
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
|
664 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
665 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
666 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
667 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
668 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
669 |
Server stops sending after bundle2 part header length |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
670 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
671 |
$ hg serve --config badserver.closeaftersendbytes=975 -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
|
672 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
673 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
674 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
675 |
requesting all changes |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
676 |
abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
677 |
(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
|
678 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
679 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
680 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
681 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
682 |
$ tail -9 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
683 |
write(28 from 28) -> (44) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
684 |
write(2 from 2) -> (42) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
685 |
write(6 from 6) -> (36) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
686 |
write(9 from 9) -> (27) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
687 |
write(9 from 9) -> (18) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
688 |
write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
689 |
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
|
690 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
691 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
692 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
693 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
694 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
695 |
Server stops sending after bundle2 part header |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
696 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
697 |
$ hg serve --config badserver.closeaftersendbytes=1022 -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
|
698 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
699 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
700 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
701 |
requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
702 |
adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
703 |
transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
704 |
rollback completed |
32024
ad41739c6b2b
bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32022
diff
changeset
|
705 |
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
|
706 |
(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
|
707 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
708 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
709 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
710 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
711 |
$ tail -10 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
712 |
write(28 from 28) -> (91) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
713 |
write(2 from 2) -> (89) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
714 |
write(6 from 6) -> (83) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
715 |
write(9 from 9) -> (74) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
716 |
write(9 from 9) -> (65) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
717 |
write(9 from 9) -> (56) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
718 |
write(9 from 9) -> (47) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
719 |
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
|
720 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
721 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
722 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
723 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
724 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
725 |
Server stops after bundle2 part payload chunk size |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
726 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
727 |
$ hg serve --config badserver.closeaftersendbytes=1031 -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
|
728 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
729 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
730 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
731 |
requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
732 |
adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
733 |
transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
734 |
rollback completed |
32024
ad41739c6b2b
bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32022
diff
changeset
|
735 |
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
|
736 |
(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
|
737 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
738 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
739 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
740 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
741 |
$ tail -11 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
742 |
write(28 from 28) -> (100) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
743 |
write(2 from 2) -> (98) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
744 |
write(6 from 6) -> (92) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
745 |
write(9 from 9) -> (83) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
746 |
write(9 from 9) -> (74) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
747 |
write(9 from 9) -> (65) 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
|
748 |
write(9 from 9) -> (56) 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
|
749 |
write(47 from 47) -> (9) 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
|
750 |
write(9 from 9) -> (0) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
751 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
752 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
753 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
754 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
755 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
756 |
Server stops sending in middle of bundle2 payload chunk |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
757 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
758 |
$ hg serve --config badserver.closeaftersendbytes=1504 -p $HGPORT -d --pid-file=hg.pid -E error.log |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
759 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
760 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
761 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
762 |
requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
763 |
adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
764 |
transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
765 |
rollback completed |
32024
ad41739c6b2b
bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32022
diff
changeset
|
766 |
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
|
767 |
(this may be an intermittent network failure; if the error persists, consider contacting the network or server operator) |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
768 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
769 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
770 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
771 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
772 |
$ tail -12 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
773 |
write(28 from 28) -> (573) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
774 |
write(2 from 2) -> (571) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
775 |
write(6 from 6) -> (565) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
776 |
write(9 from 9) -> (556) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
777 |
write(9 from 9) -> (547) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
778 |
write(9 from 9) -> (538) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
779 |
write(9 from 9) -> (529) 4\\r\\n\x00\x00\x00)\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
780 |
write(47 from 47) -> (482) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
781 |
write(9 from 9) -> (473) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
782 |
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
|
783 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
784 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
785 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
786 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
787 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
788 |
Server stops sending after 0 length payload chunk size |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
789 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
790 |
$ hg serve --config badserver.closeaftersendbytes=1513 -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
|
791 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
792 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
793 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
794 |
requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
795 |
adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
796 |
adding manifests |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
797 |
adding file changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
798 |
added 1 changesets with 1 changes to 1 files |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
799 |
transaction abort! |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
800 |
rollback completed |
32002
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
801 |
abort: HTTP request error (incomplete response) |
bf855efe5664
httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents:
32001
diff
changeset
|
802 |
(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
|
803 |
[255] |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
804 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
805 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
806 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
807 |
$ tail -13 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
808 |
write(28 from 28) -> (582) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
809 |
write(2 from 2) -> (580) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
810 |
write(6 from 6) -> (574) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
811 |
write(9 from 9) -> (565) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
812 |
write(9 from 9) -> (556) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
813 |
write(9 from 9) -> (547) 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
|
814 |
write(9 from 9) -> (538) 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
|
815 |
write(47 from 47) -> (491) 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
|
816 |
write(9 from 9) -> (482) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
817 |
write(473 from 473) -> (9) 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
|
818 |
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
|
819 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
820 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
821 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
822 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
823 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
824 |
Server stops sending after 0 part bundle part header (indicating end of bundle2 payload) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
825 |
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
|
826 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
827 |
$ hg serve --config badserver.closeaftersendbytes=1710 -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 |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
832 |
adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
833 |
adding manifests |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
834 |
adding file changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
835 |
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
|
836 |
new changesets 96ee1d7354c4 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
837 |
updating to branch default |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
838 |
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
|
839 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
840 |
$ killdaemons.py $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
841 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
842 |
$ tail -22 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
843 |
write(28 from 28) -> (779) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
844 |
write(2 from 2) -> (777) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
845 |
write(6 from 6) -> (771) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
846 |
write(9 from 9) -> (762) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
847 |
write(9 from 9) -> (753) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
848 |
write(9 from 9) -> (744) 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
|
849 |
write(9 from 9) -> (735) 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
|
850 |
write(47 from 47) -> (688) 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
|
851 |
write(9 from 9) -> (679) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
852 |
write(473 from 473) -> (206) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
853 |
write(9 from 9) -> (197) 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
|
854 |
write(9 from 9) -> (188) 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
|
855 |
write(38 from 38) -> (150) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
856 |
write(9 from 9) -> (141) 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
|
857 |
write(64 from 64) -> (77) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
858 |
write(9 from 9) -> (68) 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
|
859 |
write(9 from 9) -> (59) 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
|
860 |
write(41 from 41) -> (18) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
861 |
write(9 from 9) -> (9) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
862 |
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
|
863 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
864 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
865 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
866 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
867 |
$ rm -rf clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
868 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
869 |
Server sends a size 0 chunked-transfer size without terminating \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
870 |
|
34483
a6d95a8b7243
serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents:
34322
diff
changeset
|
871 |
$ hg serve --config badserver.closeaftersendbytes=1713 -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
|
872 |
$ cat hg.pid > $DAEMON_PIDS |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
873 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
874 |
$ hg clone http://localhost:$HGPORT/ clone |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
875 |
requesting all changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
876 |
adding changesets |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
877 |
adding manifests |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
878 |
adding file changes |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
879 |
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
|
880 |
new changesets 96ee1d7354c4 |
32001
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
881 |
updating to branch default |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
882 |
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
|
883 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
884 |
$ killdaemons.py $DAEMON_PIDS |
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 |
$ tail -23 error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
887 |
write(28 from 28) -> (782) Transfer-Encoding: chunked\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
888 |
write(2 from 2) -> (780) \r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
889 |
write(6 from 6) -> (774) 1\\r\\n\x04\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
890 |
write(9 from 9) -> (765) 4\r\nnone\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
891 |
write(9 from 9) -> (756) 4\r\nHG20\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
892 |
write(9 from 9) -> (747) 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
|
893 |
write(9 from 9) -> (738) 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
|
894 |
write(47 from 47) -> (691) 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
|
895 |
write(9 from 9) -> (682) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
896 |
write(473 from 473) -> (209) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
897 |
write(9 from 9) -> (200) 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
|
898 |
write(9 from 9) -> (191) 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
|
899 |
write(38 from 38) -> (153) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
900 |
write(9 from 9) -> (144) 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
|
901 |
write(64 from 64) -> (80) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
902 |
write(9 from 9) -> (71) 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
|
903 |
write(9 from 9) -> (62) 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
|
904 |
write(41 from 41) -> (21) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
905 |
write(9 from 9) -> (12) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
906 |
write(9 from 9) -> (3) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc) |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
907 |
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
|
908 |
write limit reached; closing socket |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
909 |
write(27) -> 15\r\nInternal Server Error\r\n |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
910 |
|
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
911 |
$ rm -f error.log |
c85f19c66e8d
tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
912 |
$ rm -rf clone |