annotate tests/test-http-bad-server.t @ 37507:9b16a67cef56

eol: look up partial nodeid as partial nodeid Similar reasoning as the previous patch. For some reason the hook gives us a partial nodeid, so we need to resolve that to a full nodeid. Differential Revision: https://phab.mercurial-scm.org/D3159
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 06 Apr 2018 09:53:17 -0700
parents aacfca6f9767
children 930c433eb311
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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
35232
a037b6647d8c tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 35074
diff changeset
39 abort: error: $ECONNRESET$
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
40 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
41
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
42 (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
43 So ensure the process is dead.)
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
44
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
45 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
46
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
47 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
48
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
49 $ 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
50 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
51
32064
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
52 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
53 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
54 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
55
35232
a037b6647d8c tests: add a substitution for ECONNRESET/WSAECONNRESET messages
Matt Harbison <matt_harbison@yahoo.com>
parents: 35074
diff changeset
56 abort: error: $ECONNRESET$
32064
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
57
f82cdd5ee57e tests: work around flaky test failure on FreeBSD and relatives
Augie Fackler <augie@google.com>
parents: 32024
diff changeset
58 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
59 --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
60 $ 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
61 abort: error: * (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
62 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
63
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
64 $ killdaemons.py $DAEMON_PIDS
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 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
67
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
68 $ 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
69 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
70
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
71 $ 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
72 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
73 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
74
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
75 $ killdaemons.py $DAEMON_PIDS
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 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
78 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
79 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
80
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
81 $ rm -f error.log
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 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
84
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
85 $ 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
86 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
87 $ 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
88 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
89 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
90
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
91 $ killdaemons.py $DAEMON_PIDS
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 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
94 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
95 readline(7 from -1) -> (7) Accept-
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
96 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
97
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
98 $ rm -f error.log
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 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
101
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
102 $ hg serve --config badserver.closeafterrecvbytes=256,223 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
104 $ 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
105 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
106 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
107
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
108 $ killdaemons.py $DAEMON_PIDS
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 $ cat error.log
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
111 readline(256 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
112 readline(223 from -1) -> (27) Accept-Encoding: identity\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
113 readline(196 from -1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
114 readline(177 from -1) -> (27) x-hgproto-1: partial-pull\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
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
116 readline(115 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
117 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
118 readline(* 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
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
121 write(37) -> Date: $HTTP_DATE$\r\n
32001
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
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
123 write(21) -> Content-Length: 436\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
124 write(2) -> \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
125 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
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
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
129 readline(223 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
130 readline(197 from -1) -> (27) Accept-Encoding: identity\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
131 readline(170 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
132 readline(141 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
133 readline(100 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
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
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
142 $ hg serve --config badserver.closeafterrecvbytes=354,317,304 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
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
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
152 readline(1 from -1) -> (1) x (?)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
153 readline(1 from -1) -> (1) x (?)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
154 readline(354 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
155 readline(321 from -1) -> (27) Accept-Encoding: identity\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
156 readline(294 from -1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
157 readline(275 from -1) -> (27) x-hgproto-1: partial-pull\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
158 readline(248 from -1) -> (35) accept: application/mercurial-0.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
159 readline(213 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
160 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
161 readline(* 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
162 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
163 write(23) -> Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
164 write(37) -> Date: $HTTP_DATE$\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
165 write(41) -> Content-Type: application/mercurial-0.1\r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
166 write(21) -> Content-Length: 436\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
167 write(2) -> \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
168 write(436) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
169 readline(13? from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n (glob)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
170 readline(1?? from -1) -> (27) Accept-Encoding: identity\r\n (glob)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
171 readline(8? from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n (glob)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
172 readline(5? from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n (glob)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
173 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
174 read limit reached; closing socket
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
175 readline(317 from 65537) -> (26) GET /?cmd=batch HTTP/1.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
176 readline(291 from -1) -> (27) Accept-Encoding: identity\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
177 readline(264 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
178 readline(235 from -1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
179 readline(194 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
180 readline(133 from -1) -> (35) accept: application/mercurial-0.1\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
181 readline(98 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
182 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
183 readline(* 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
184 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
185 write(23) -> Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
186 write(37) -> Date: $HTTP_DATE$\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
187 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
188 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
189 write(2) -> \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
190 write(42) -> 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
191 readline(* from 65537) -> (*) GET /?cmd=getbundle HTTP* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
192 read limit reached; closing socket
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
193 readline(304 from 65537) -> (30) GET /?cmd=getbundle HTTP/1.1\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
194 readline(274 from -1) -> (27) Accept-Encoding: identity\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
195 readline(247 from -1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
196 readline(218 from -1) -> (218) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtag
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
197 read limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
198
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
199 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
200
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
201 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
202
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
203 $ hg serve --config experimental.httppostargs=true --config badserver.closeafterrecvbytes=361,330 -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
204 $ cat hg.pid > $DAEMON_PIDS
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 $ 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
207 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
208 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
209
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
210 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
211
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
212 $ cat error.log
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
213 readline(361 from 65537) -> (33) GET /?cmd=capabilities HTTP/1.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
214 readline(328 from -1) -> (27) Accept-Encoding: identity\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
215 readline(301 from -1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
216 readline(282 from -1) -> (27) x-hgproto-1: partial-pull\r\n
32022
e5d7f99a3063 httppeer: don't send empty Vary request header
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32020
diff changeset
217 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
218 readline(220 from -1) -> (2?) host: localhost:$HGPORT\r\n (glob)
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
219 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
220 readline(* 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
221 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
222 write(23) -> Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
223 write(37) -> Date: $HTTP_DATE$\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
224 write(41) -> Content-Type: application/mercurial-0.1\r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
225 write(21) -> Content-Length: 449\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
226 write(2) -> \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
227 write(449) -> batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx httppostargs known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
228 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
229 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
230 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
231 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
232 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
233 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
234 read limit reached; closing socket
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
235 readline(330 from 65537) -> (27) POST /?cmd=batch HTTP/1.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
236 readline(303 from -1) -> (27) Accept-Encoding: identity\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
237 readline(276 from -1) -> (41) content-type: application/mercurial-0.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
238 readline(235 from -1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
239 readline(216 from -1) -> (19) x-hgargs-post: 28\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
240 readline(197 from -1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
241 readline(136 from -1) -> (35) accept: application/mercurial-0.1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
242 readline(101 from -1) -> (20) content-length: 28\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
243 readline(81 from -1) -> (*) host: localhost:$HGPORT\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
244 readline(* from -1) -> (49) user-agent: mercurial/proto-1.0 (Mercurial 4.2)\r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
245 readline(* from -1) -> (2) \r\n (glob)
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
246 read(* from 28) -> (*) cmds=* (glob)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
247 read limit reached, closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
248 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
249
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
250 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
251
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
252 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
253
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
254 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
255
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
256 $ 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
257 $ cat hg.pid > $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 $ 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
260 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
261 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
262
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
263 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
264
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
265 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
266 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
267 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
268 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
269 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
270 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
271 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
272 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
273 readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
274 write(1 from 36) -> (0) H
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
275 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
276 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
277
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
278 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
279
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
280 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
281
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
282 $ 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
283 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
284
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
285 $ hg clone http://localhost:$HGPORT/ clone
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
286 abort: HTTP request error (incomplete response; expected 416 bytes got 20)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
287 (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
288 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
289
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
290 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
291
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
292 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
293 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
294 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
295 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
296 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
297 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
298 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
299 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
300 readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
301 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
302 write(23 from 23) -> (121) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
303 write(37 from 37) -> (84) Date: $HTTP_DATE$\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
304 write(41 from 41) -> (43) Content-Type: application/mercurial-0.1\r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
305 write(21 from 21) -> (22) Content-Length: 436\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
306 write(2 from 2) -> (20) \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
307 write(20 from 436) -> (0) batch branchmap bund
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
308 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
309
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
310 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
311
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
312 Server sends incomplete headers for batch request
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
313
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
314 $ hg serve --config badserver.closeaftersendbytes=714 -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
315 $ cat hg.pid > $DAEMON_PIDS
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 TODO this output is horrible
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 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
320 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
321 ---%<--- (applicat)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
322
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
323 ---%<---
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
324 !
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
325 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
326
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
327 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
328
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
329 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
330 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
331 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
332 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
333 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
334 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
335 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
336 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
337 readline(-1) -> (2) \r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
338 write(36 from 36) -> (678) HTTP/1.1 200 Script output follows\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
339 write(23 from 23) -> (655) Server: badhttpserver\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
340 write(37 from 37) -> (618) Date: $HTTP_DATE$\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
341 write(41 from 41) -> (577) Content-Type: application/mercurial-0.1\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
342 write(21 from 21) -> (556) Content-Length: 436\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
343 write(2 from 2) -> (554) \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
344 write(436 from 436) -> (118) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
345 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
346 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
347 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
348 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
349 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
350 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
351 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
352 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
353 readline(-1) -> (2) \r\n
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
354 write(36 from 36) -> (82) HTTP/1.1 200 Script output follows\r\n
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
355 write(23 from 23) -> (59) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
356 write(37 from 37) -> (22) Date: $HTTP_DATE$\r\n
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
357 write(22 from 41) -> (0) Content-Type: applicat
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
358 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
359 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
360
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
361 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
362
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
363 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
364
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
365 $ hg serve --config badserver.closeaftersendbytes=779 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
366 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
367
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
368 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
369 #if no-chg
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
370 $ 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
371 [1]
34483
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
372 #else
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
373 $ 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
374 [255]
a6d95a8b7243 serve: make tests compatible with chg
Saurabh Singh <singhsrb@fb.com>
parents: 34322
diff changeset
375 #endif
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
376
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
377 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
378
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
379 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
380 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
381 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
382 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
383 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
384 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
385 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
386 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
387 readline(-1) -> (2) \r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
388 write(36 from 36) -> (743) HTTP/1.1 200 Script output follows\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
389 write(23 from 23) -> (720) Server: badhttpserver\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
390 write(37 from 37) -> (683) Date: $HTTP_DATE$\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
391 write(41 from 41) -> (642) Content-Type: application/mercurial-0.1\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
392 write(21 from 21) -> (621) Content-Length: 436\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
393 write(2 from 2) -> (619) \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
394 write(436 from 436) -> (183) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
395 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
396 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
397 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
398 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
399 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
400 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
401 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
402 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
403 readline(-1) -> (2) \r\n
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
404 write(36 from 36) -> (147) HTTP/1.1 200 Script output follows\r\n
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
405 write(23 from 23) -> (124) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
406 write(37 from 37) -> (87) Date: $HTTP_DATE$\r\n
35259
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
407 write(41 from 41) -> (46) Content-Type: application/mercurial-0.1\r\n
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
408 write(20 from 20) -> (26) Content-Length: 42\r\n
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
409 write(2 from 2) -> (24) \r\n
ad5f2b923b0d push: include a 'check:bookmarks' part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35232
diff changeset
410 write(24 from 42) -> (0) 96ee1d7354c4ad7372047672
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
411 write limit reached; closing socket
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 $ rm -f error.log
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 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
416
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
417 $ hg serve --config badserver.closeaftersendbytes=926 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
418 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
419
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
420 TODO this output is terrible
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
421
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
422 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
423 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
424 abort: 'http://localhost:$HGPORT/' does not appear to be an hg repository:
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
425 ---%<--- (application/mercuri)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
426
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
427 ---%<---
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
428 !
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
429 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
430
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
431 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
432
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
433 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
434 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
435 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
436 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
437 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
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
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
442 write(36 from 36) -> (890) HTTP/1.1 200 Script output follows\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
443 write(23 from 23) -> (867) Server: badhttpserver\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
444 write(37 from 37) -> (830) Date: $HTTP_DATE$\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
445 write(41 from 41) -> (789) Content-Type: application/mercurial-0.1\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
446 write(21 from 21) -> (768) Content-Length: 436\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
447 write(2 from 2) -> (766) \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
448 write(436 from 436) -> (330) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
449 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
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) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
453 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
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
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
458 write(36 from 36) -> (294) HTTP/1.1 200 Script output follows\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
459 write(23 from 23) -> (271) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
460 write(37 from 37) -> (234) Date: $HTTP_DATE$\r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
461 write(41 from 41) -> (193) Content-Type: application/mercurial-0.1\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
462 write(20 from 20) -> (173) Content-Length: 42\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
463 write(2 from 2) -> (171) \r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
464 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
465 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
466 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
467 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
468 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
469 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
470 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
471 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
472 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
473 readline(-1) -> (2) \r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
474 write(36 from 36) -> (93) HTTP/1.1 200 Script output follows\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
475 write(23 from 23) -> (70) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
476 write(37 from 37) -> (33) Date: $HTTP_DATE$\r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
477 write(33 from 41) -> (0) Content-Type: application/mercuri
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
478 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
479 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
480
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
481 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
482
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
483 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
484
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
485 $ hg serve --config badserver.closeaftersendbytes=964 -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
486 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
487
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
488 $ 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
489 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
490 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
491 (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
492 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
493
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
494 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
495
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
496 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
497 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
498 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
499 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
500 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
501 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
502 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
503 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
504 readline(-1) -> (2) \r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
505 write(36 from 36) -> (928) HTTP/1.1 200 Script output follows\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
506 write(23 from 23) -> (905) Server: badhttpserver\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
507 write(37 from 37) -> (868) Date: $HTTP_DATE$\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
508 write(41 from 41) -> (827) Content-Type: application/mercurial-0.1\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
509 write(21 from 21) -> (806) Content-Length: 436\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
510 write(2 from 2) -> (804) \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
511 write(436 from 436) -> (368) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
512 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
513 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
514 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
515 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
516 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
517 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
518 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
519 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
520 readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
521 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
522 write(23 from 23) -> (309) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
523 write(37 from 37) -> (272) Date: $HTTP_DATE$\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
524 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
525 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
526 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
527 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
528 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
529 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
530 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
531 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
532 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
533 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
534 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
535 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
536 readline(-1) -> (2) \r\n
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
537 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
538 write(23 from 23) -> (108) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
539 write(37 from 37) -> (71) Date: $HTTP_DATE$\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
540 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
541 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
542 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
543 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
544 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
545
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
546 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
547
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
548 Server sends partial compression string
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
549
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
550 $ hg serve --config badserver.closeaftersendbytes=988 -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
551 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
552
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
553 $ 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
554 requesting all changes
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
555 abort: HTTP request error (incomplete response)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
556 (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
557 [255]
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
558
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
559 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
560
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
561 $ cat error.log
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
562 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
563 readline(-1) -> (27) Accept-Encoding: identity\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
564 readline(-1) -> (19) vary: X-HgProto-1\r\n
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
565 readline(-1) -> (27) x-hgproto-1: partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
566 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
567 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
568 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
569 readline(-1) -> (2) \r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
570 write(36 from 36) -> (952) HTTP/1.1 200 Script output follows\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
571 write(23 from 23) -> (929) Server: badhttpserver\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
572 write(37 from 37) -> (892) Date: $HTTP_DATE$\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
573 write(41 from 41) -> (851) Content-Type: application/mercurial-0.1\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
574 write(21 from 21) -> (830) Content-Length: 436\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
575 write(2 from 2) -> (828) \r\n
37413
33af46d639b4 wireproto: send server capabilities in canonical order
Joerg Sonnenberger <joerg@bec.de>
parents: 37053
diff changeset
576 write(436 from 436) -> (392) batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Arev-branch-cache changegroupsubset compression=none getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
577 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
578 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
579 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
580 readline(-1) -> (41) x-hgarg-1: cmds=heads+%3Bknown+nodes%3D\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
581 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
582 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
583 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
584 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
585 readline(-1) -> (2) \r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
586 write(36 from 36) -> (356) HTTP/1.1 200 Script output follows\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
587 write(23 from 23) -> (333) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
588 write(37 from 37) -> (296) Date: $HTTP_DATE$\r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
589 write(41 from 41) -> (255) Content-Type: application/mercurial-0.1\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
590 write(20 from 20) -> (235) Content-Length: 42\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
591 write(2 from 2) -> (233) \r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
592 write(42 from 42) -> (191) 96ee1d7354c4ad7372047672c36a1f561e3a6a4c\n;
32282
0c0c9b12de52 tests: remove regular expression matching for Python 2.6
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32089
diff changeset
593 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
594 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
595 readline(-1) -> (29) vary: X-HgArg-1,X-HgProto-1\r\n
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
596 readline(-1) -> (461) x-hgarg-1: bookmarks=1&bundlecaps=HG20%2Cbundle2%3DHG20%250Abookmarks%250Achangegroup%253D01%252C02%250Adigests%253Dmd5%252Csha1%252Csha512%250Aerror%253Dabort%252Cunsupportedcontent%252Cpushraced%252Cpushkey%250Ahgtagsfnodes%250Alistkeys%250Apushkey%250Aremote-changegroup%253Dhttp%252Chttps%250Arev-branch-cache%250Astream%253Dv2&cg=1&common=0000000000000000000000000000000000000000&heads=96ee1d7354c4ad7372047672c36a1f561e3a6a4c&listkeys=phases%2Cbookmarks\r\n
37498
aacfca6f9767 wireproto: support for pullbundles
Joerg Sonnenberger <joerg@bec.de>
parents: 37413
diff changeset
597 readline(-1) -> (61) x-hgproto-1: 0.1 0.2 comp=$USUAL_COMPRESSIONS$ partial-pull\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
598 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
599 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
600 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
601 readline(-1) -> (2) \r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
602 write(36 from 36) -> (155) HTTP/1.1 200 Script output follows\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
603 write(23 from 23) -> (132) Server: badhttpserver\r\n
36924
03368431f014 tests: add a substitution pattern for dates in HTTP headers and LFS payload
Matt Harbison <matt_harbison@yahoo.com>
parents: 36612
diff changeset
604 write(37 from 37) -> (95) Date: $HTTP_DATE$\r\n
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
605 write(41 from 41) -> (54) Content-Type: application/mercurial-0.2\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
606 write(28 from 28) -> (26) Transfer-Encoding: chunked\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
607 write(2 from 2) -> (24) \r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
608 write(6 from 6) -> (18) 1\\r\\n\x04\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
609 write(9 from 9) -> (9) 4\r\nnone\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
610 write(9 from 9) -> (0) 4\r\nHG20\r\n
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
611 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
612 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
613
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
614 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
615
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
616 Server sends partial bundle2 header magic
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
617
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
618 $ hg serve --config badserver.closeaftersendbytes=985 -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
619 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
620
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
621 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
622 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
623 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
624 (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
625 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
626
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
627 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
628
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
629 $ tail -7 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
630 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
631 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
632 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
633 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
634 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
635 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
636 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
637
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
638 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
639
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
640 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
641
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
642 $ hg serve --config badserver.closeaftersendbytes=994 -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
643 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
644
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
645 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
646 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
647 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
648 (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
649 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
650
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
651 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
652
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
653 $ tail -8 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
654 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
655 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
656 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
657 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
658 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
659 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
660 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
661 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
662
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
663 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
664
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
665 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
666
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
667 $ hg serve --config badserver.closeaftersendbytes=997 -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
668 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
669
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
670 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
671 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
672 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
673 (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
674 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
675
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
676 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
677
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
678 $ tail -8 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
679 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
680 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
681 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
682 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
683 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
684 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
685 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
686 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
687
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
688 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
689
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
690 Server 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
691
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
692 $ hg serve --config badserver.closeaftersendbytes=1006 -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
693 $ cat hg.pid > $DAEMON_PIDS
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 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
696 requesting all changes
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
697 abort: HTTP request error (incomplete response)
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
698 (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
699 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
700
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
701 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
702
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
703 $ tail -9 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
704 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
705 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
706 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
707 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
708 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
709 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
710 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
711 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
712 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
713
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
714 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
715
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
716 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
717
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
718 $ hg serve --config badserver.closeaftersendbytes=1053 -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
719 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
720
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
721 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
722 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
723 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
724 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
725 rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
726 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
727 (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
728 [255]
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 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
731
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
732 $ tail -10 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
733 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
734 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
735 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
736 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
737 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
738 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
739 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
740 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
741 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
742 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
743
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
744 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
745
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
746 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
747
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
748 $ hg serve --config badserver.closeaftersendbytes=1074 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
749 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
750
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
751 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
752 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
753 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
754 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
755 rollback completed
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
756 abort: HTTP request error (incomplete response; expected 459 bytes got 7)
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
757 (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
758 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
759
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
760 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
761
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
762 $ tail -11 error.log
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
763 write(2 from 2) -> (110) \r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
764 write(6 from 6) -> (104) 1\\r\\n\x04\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
765 write(9 from 9) -> (95) 4\r\nnone\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
766 write(9 from 9) -> (86) 4\r\nHG20\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
767 write(9 from 9) -> (77) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
768 write(9 from 9) -> (68) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
769 write(47 from 47) -> (21) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
770 write(9 from 9) -> (12) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
771 write(12 from 473) -> (0) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1d (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
772 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
773 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
774
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
775 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
776
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
777 Server 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
778
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
779 $ hg serve --config badserver.closeaftersendbytes=1535 -p $HGPORT -d --pid-file=hg.pid -E error.log
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
780 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
781
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
782 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
783 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
784 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
785 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
786 rollback completed
32024
ad41739c6b2b bundle2: ignore errors seeking a bundle after an exception (issue4784)
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32022
diff changeset
787 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
788 (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
789 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
790
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
791 $ killdaemons.py $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 $ tail -12 error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
794 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
795 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
796 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
797 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
798 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
799 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
800 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
801 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
802 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
803 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
804 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
805 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
806
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
807 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
808
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
809 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
810
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
811 $ hg serve --config badserver.closeaftersendbytes=1566 -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
812 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
813
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
814 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
815 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
816 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
817 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
818 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
819 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
820 transaction abort!
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
821 rollback completed
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
822 abort: HTTP request error (incomplete response; expected 23 bytes got 9)
32002
bf855efe5664 httppeer: wrap HTTPResponse.read() globally
Gregory Szorc <gregory.szorc@gmail.com>
parents: 32001
diff changeset
823 (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
824 [255]
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
825
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
826 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
827
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
828 $ tail -13 error.log
35268
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
829 write(6 from 6) -> (596) 1\\r\\n\x04\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
830 write(9 from 9) -> (587) 4\r\nnone\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
831 write(9 from 9) -> (578) 4\r\nHG20\r\n
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
832 write(9 from 9) -> (569) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
833 write(9 from 9) -> (560) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
834 write(47 from 47) -> (513) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
835 write(9 from 9) -> (504) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
836 write(473 from 473) -> (31) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
837 write(9 from 9) -> (22) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
838 write(9 from 9) -> (13) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
44b8b5ad30eb pull: retrieve bookmarks through the binary part when possible
Boris Feld <boris.feld@octobus.net>
parents: 35259
diff changeset
839 write(13 from 38) -> (0) 20\\r\\n\x08LISTKEYS (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
840 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
841 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
842
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
843 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
844
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
845 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
846 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
847
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
848 # $ hg serve --config badserver.closeaftersendbytes=1741 -p $HGPORT -d --pid-file=hg.pid -E error.log
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
849 $ hg serve --config badserver.closeaftersendbytes=1848 -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
850 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
851
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
852 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
853 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
854 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
855 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
856 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
857 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
858 new changesets 96ee1d7354c4
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
859 updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
860 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
861
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
862 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
863
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
864 $ tail -22 error.log
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
865 write(9 from 9) -> (851) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
866 write(9 from 9) -> (842) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
867 write(47 from 47) -> (795) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
868 write(9 from 9) -> (786) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
869 write(473 from 473) -> (313) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
870 write(9 from 9) -> (304) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
871 write(9 from 9) -> (295) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
872 write(38 from 38) -> (257) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
873 write(9 from 9) -> (248) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
874 write(64 from 64) -> (184) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
875 write(9 from 9) -> (175) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
876 write(9 from 9) -> (166) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
877 write(41 from 41) -> (125) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
878 write(9 from 9) -> (116) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
879 write(9 from 9) -> (107) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
880 write(35 from 35) -> (72) 1d\\r\\n\x16CACHE:REV-BRANCH-CACHE\x00\x00\x00\x03\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
881 write(9 from 9) -> (63) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
882 write(45 from 45) -> (18) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
883 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
884 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
885 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
886 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
887
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
888 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
889 $ rm -rf clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
890
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
891 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
892
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
893 $ hg serve --config badserver.closeaftersendbytes=1851 -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
894 $ cat hg.pid > $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
895
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
896 $ hg clone http://localhost:$HGPORT/ clone
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
897 requesting all changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
898 adding changesets
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
899 adding manifests
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
900 adding file changes
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
901 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
902 new changesets 96ee1d7354c4
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
903 updating to branch default
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
904 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
905
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
906 $ killdaemons.py $DAEMON_PIDS
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
907
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
908 $ tail -23 error.log
36968
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
909 write(9 from 9) -> (854) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
910 write(9 from 9) -> (845) 4\\r\\n\x00\x00\x00)\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
911 write(47 from 47) -> (798) 29\\r\\n\x0bCHANGEGROUP\x00\x00\x00\x00\x01\x01\x07\x02 \x01version02nbchanges1\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
912 write(9 from 9) -> (789) 4\\r\\n\x00\x00\x01\xd2\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
913 write(473 from 473) -> (316) 1d2\\r\\n\x00\x00\x00\xb2\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00>6a3df4de388f3c4f8e28f4f9a814299a3cbb5f50\\ntest\\n0 0\\nfoo\\n\\ninitial\x00\x00\x00\x00\x00\x00\x00\xa1j=\xf4\xde8\x8f<O\x8e(\xf4\xf9\xa8\x14)\x9a<\xbb_P\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00-foo\x00b80de5d138758541c5f05265ad144ab9fa86d1db\\n\x00\x00\x00\x00\x00\x00\x00\x07foo\x00\x00\x00h\xb8\\r\xe5\xd18u\x85A\xc5\xf0Re\xad\x14J\xb9\xfa\x86\xd1\xdb\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\x00\x00\x00\x00\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
914 write(9 from 9) -> (307) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
915 write(9 from 9) -> (298) 4\\r\\n\x00\x00\x00 \\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
916 write(38 from 38) -> (260) 20\\r\\n\x08LISTKEYS\x00\x00\x00\x01\x01\x00 \x06namespacephases\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
917 write(9 from 9) -> (251) 4\\r\\n\x00\x00\x00:\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
918 write(64 from 64) -> (187) 3a\r\n96ee1d7354c4ad7372047672c36a1f561e3a6a4c 1\npublishing True\r\n
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
919 write(9 from 9) -> (178) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
920 write(9 from 9) -> (169) 4\\r\\n\x00\x00\x00#\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
921 write(41 from 41) -> (128) 23\\r\\n\x08LISTKEYS\x00\x00\x00\x02\x01\x00 namespacebookmarks\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
922 write(9 from 9) -> (119) 4\\r\\n\x00\x00\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
923 write(9 from 9) -> (110) 4\\r\\n\x00\x00\x00\x1d\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
924 write(35 from 35) -> (75) 1d\\r\\n\x16CACHE:REV-BRANCH-CACHE\x00\x00\x00\x03\x00\x00\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
925 write(9 from 9) -> (66) 4\\r\\n\x00\x00\x00'\\r\\n (esc)
2090044a288d revbranchcache: advertise and use 'rbc' exchange capability
Boris Feld <boris.feld@octobus.net>
parents: 36924
diff changeset
926 write(45 from 45) -> (21) 27\\r\\n\x00\x00\x00\x07\x00\x00\x00\x01\x00\x00\x00\x00default\x96\xee\x1dsT\xc4\xadsr\x04vr\xc3j\x1fV\x1e:jL\\r\\n (esc)
32001
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
927 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
928 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
929 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
930 write limit reached; closing socket
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
931 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
932
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
933 $ rm -f error.log
c85f19c66e8d tests: add tests for poorly behaving HTTP server
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
934 $ rm -rf clone