Show More
This diff has been collapsed as it changes many lines, (1394 lines changed) Show them Hide them | |||
@@ -1,1473 +1,1483 | |||
|
1 | TRANSITIONAL CONFIG | |
|
2 | $ cat << EOF >> $HGRCPATH | |
|
3 | > [format] | |
|
4 | > sparse-revlog = yes | |
|
5 | > EOF | |
|
6 | ||
|
1 | 7 |
$ |
|
2 | 8 | |
|
3 | 9 |
$ |
|
4 | 10 | > [extensions] |
|
5 | 11 | > blackbox = |
|
6 | 12 | > [blackbox] |
|
7 | 13 | > track = simplecache |
|
8 | 14 | > EOF |
|
9 | 15 | |
|
10 | 16 |
$ |
|
11 | 17 | $ enablehttpv2 server |
|
12 | 18 | $ cd server |
|
13 | 19 | $ cat >> .hg/hgrc << EOF |
|
14 | 20 | > [server] |
|
15 | 21 | > compressionengines = zlib |
|
16 | 22 | > [extensions] |
|
17 | 23 | > simplecache = $TESTDIR/wireprotosimplecache.py |
|
18 | 24 | > [simplecache] |
|
19 | 25 | > cacheapi = true |
|
20 | 26 | > EOF |
|
21 | 27 | |
|
22 | 28 | $ echo a0 > a |
|
23 | 29 | $ echo b0 > b |
|
24 | 30 | $ hg -q commit -A -m 'commit 0' |
|
25 | 31 | $ echo a1 > a |
|
26 | 32 | $ hg commit -m 'commit 1' |
|
27 | 33 | |
|
28 | 34 | $ hg --debug debugindex -m |
|
29 | 35 | rev linkrev nodeid p1 p2 |
|
30 | 36 | 0 0 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 |
|
31 | 37 | 1 1 a988fb43583e871d1ed5750ee074c6d840bbbfc8 992f4779029a3df8d0666d00bb924f69634e2641 0000000000000000000000000000000000000000 |
|
32 | 38 | |
|
33 | 39 | $ hg --config simplecache.redirectsfile=redirects.py serve -p $HGPORT -d --pid-file hg.pid -E error.log |
|
34 | 40 | $ cat hg.pid > $DAEMON_PIDS |
|
35 | 41 | |
|
36 | 42 | $ cat > redirects.py << EOF |
|
37 | 43 | > [ |
|
38 | 44 | > { |
|
39 | 45 | > b'name': b'target-a', |
|
40 | 46 | > b'protocol': b'http', |
|
41 | 47 | > b'snirequired': False, |
|
42 | 48 | > b'tlsversions': [b'1.2', b'1.3'], |
|
43 | 49 | > b'uris': [b'http://example.com/'], |
|
44 | 50 | > }, |
|
45 | 51 | > ] |
|
46 | 52 | > EOF |
|
47 | 53 | |
|
48 | 54 | Redirect targets advertised when configured |
|
49 | 55 | |
|
50 | 56 | $ sendhttpv2peerhandshake << EOF |
|
51 | 57 | > command capabilities |
|
52 | 58 | > EOF |
|
53 | 59 | creating http peer for wire protocol version 2 |
|
54 | 60 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
55 | 61 | s> Accept-Encoding: identity\r\n |
|
56 | 62 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
57 | 63 | s> x-hgproto-1: cbor\r\n |
|
58 | 64 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
59 | 65 | s> accept: application/mercurial-0.1\r\n |
|
60 | 66 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
61 | 67 | s> user-agent: Mercurial debugwireproto\r\n |
|
62 | 68 | s> \r\n |
|
63 | 69 | s> makefile('rb', None) |
|
64 | 70 | s> HTTP/1.1 200 OK\r\n |
|
65 | 71 | s> Server: testing stub value\r\n |
|
66 | 72 | s> Date: $HTTP_DATE$\r\n |
|
67 | 73 | s> Content-Type: application/mercurial-cbor\r\n |
|
68 |
s> Content-Length: 225 |
|
|
74 | s> Content-Length: 2285\r\n | |
|
69 | 75 | s> \r\n |
|
70 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
|
76 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
71 | 77 | (remote redirect target target-a is compatible) (tls1.2 !) |
|
72 | 78 | (remote redirect target target-a requires unsupported TLS versions: 1.2, 1.3) (no-tls1.2 !) |
|
73 | 79 | sending capabilities command |
|
74 | 80 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
75 | 81 | s> Accept-Encoding: identity\r\n |
|
76 | 82 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
77 | 83 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
78 | 84 | s> content-length: 111\r\n (tls1.2 !) |
|
79 | 85 | s> content-length: 102\r\n (no-tls1.2 !) |
|
80 | 86 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
81 | 87 | s> user-agent: Mercurial debugwireproto\r\n |
|
82 | 88 | s> \r\n |
|
83 | 89 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a (tls1.2 !) |
|
84 | 90 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 (no-tls1.2 !) |
|
85 | 91 | s> makefile('rb', None) |
|
86 | 92 | s> HTTP/1.1 200 OK\r\n |
|
87 | 93 | s> Server: testing stub value\r\n |
|
88 | 94 | s> Date: $HTTP_DATE$\r\n |
|
89 | 95 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
90 | 96 | s> Transfer-Encoding: chunked\r\n |
|
91 | 97 | s> \r\n |
|
92 | 98 | s> 11\r\n |
|
93 | 99 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
94 | 100 | s> Hidentity |
|
95 | 101 | s> \r\n |
|
96 | 102 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
97 | 103 | s> 13\r\n |
|
98 | 104 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
99 | 105 | s> \xa1FstatusBok |
|
100 | 106 | s> \r\n |
|
101 | 107 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
108 | s> 6de\r\n | |
|
109 | s> \xd6\x06\x00\x01\x00\x02\x041 | |
|
110 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/ | |
|
111 | s> \r\n | |
|
112 | received frame(size=1750; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
113 | s> 8\r\n | |
|
114 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
115 | s> \r\n | |
|
116 | s> 0\r\n | |
|
117 | s> \r\n | |
|
118 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
119 | response: gen[ | |
|
120 | { | |
|
121 | b'commands': { | |
|
122 | b'branchmap': { | |
|
123 | b'args': {}, | |
|
124 | b'permissions': [ | |
|
125 | b'pull' | |
|
126 | ] | |
|
127 | }, | |
|
128 | b'capabilities': { | |
|
129 | b'args': {}, | |
|
130 | b'permissions': [ | |
|
131 | b'pull' | |
|
132 | ] | |
|
133 | }, | |
|
134 | b'changesetdata': { | |
|
135 | b'args': { | |
|
136 | b'fields': { | |
|
137 | b'default': set([]), | |
|
138 | b'required': False, | |
|
139 | b'type': b'set', | |
|
140 | b'validvalues': set([ | |
|
141 | b'bookmarks', | |
|
142 | b'parents', | |
|
143 | b'phase', | |
|
144 | b'revision' | |
|
145 | ]) | |
|
146 | }, | |
|
147 | b'revisions': { | |
|
148 | b'required': True, | |
|
149 | b'type': b'list' | |
|
150 | } | |
|
151 | }, | |
|
152 | b'permissions': [ | |
|
153 | b'pull' | |
|
154 | ] | |
|
155 | }, | |
|
156 | b'filedata': { | |
|
157 | b'args': { | |
|
158 | b'fields': { | |
|
159 | b'default': set([]), | |
|
160 | b'required': False, | |
|
161 | b'type': b'set', | |
|
162 | b'validvalues': set([ | |
|
163 | b'linknode', | |
|
164 | b'parents', | |
|
165 | b'revision' | |
|
166 | ]) | |
|
167 | }, | |
|
168 | b'haveparents': { | |
|
169 | b'default': False, | |
|
170 | b'required': False, | |
|
171 | b'type': b'bool' | |
|
172 | }, | |
|
173 | b'nodes': { | |
|
174 | b'required': True, | |
|
175 | b'type': b'list' | |
|
176 | }, | |
|
177 | b'path': { | |
|
178 | b'required': True, | |
|
179 | b'type': b'bytes' | |
|
180 | } | |
|
181 | }, | |
|
182 | b'permissions': [ | |
|
183 | b'pull' | |
|
184 | ] | |
|
185 | }, | |
|
186 | b'filesdata': { | |
|
187 | b'args': { | |
|
188 | b'fields': { | |
|
189 | b'default': set([]), | |
|
190 | b'required': False, | |
|
191 | b'type': b'set', | |
|
192 | b'validvalues': set([ | |
|
193 | b'firstchangeset', | |
|
194 | b'linknode', | |
|
195 | b'parents', | |
|
196 | b'revision' | |
|
197 | ]) | |
|
198 | }, | |
|
199 | b'haveparents': { | |
|
200 | b'default': False, | |
|
201 | b'required': False, | |
|
202 | b'type': b'bool' | |
|
203 | }, | |
|
204 | b'pathfilter': { | |
|
205 | b'default': None, | |
|
206 | b'required': False, | |
|
207 | b'type': b'dict' | |
|
208 | }, | |
|
209 | b'revisions': { | |
|
210 | b'required': True, | |
|
211 | b'type': b'list' | |
|
212 | } | |
|
213 | }, | |
|
214 | b'permissions': [ | |
|
215 | b'pull' | |
|
216 | ], | |
|
217 | b'recommendedbatchsize': 50000 | |
|
218 | }, | |
|
219 | b'heads': { | |
|
220 | b'args': { | |
|
221 | b'publiconly': { | |
|
222 | b'default': False, | |
|
223 | b'required': False, | |
|
224 | b'type': b'bool' | |
|
225 | } | |
|
226 | }, | |
|
227 | b'permissions': [ | |
|
228 | b'pull' | |
|
229 | ] | |
|
230 | }, | |
|
231 | b'known': { | |
|
232 | b'args': { | |
|
233 | b'nodes': { | |
|
234 | b'default': [], | |
|
235 | b'required': False, | |
|
236 | b'type': b'list' | |
|
237 | } | |
|
238 | }, | |
|
239 | b'permissions': [ | |
|
240 | b'pull' | |
|
241 | ] | |
|
242 | }, | |
|
243 | b'listkeys': { | |
|
244 | b'args': { | |
|
245 | b'namespace': { | |
|
246 | b'required': True, | |
|
247 | b'type': b'bytes' | |
|
248 | } | |
|
249 | }, | |
|
250 | b'permissions': [ | |
|
251 | b'pull' | |
|
252 | ] | |
|
253 | }, | |
|
254 | b'lookup': { | |
|
255 | b'args': { | |
|
256 | b'key': { | |
|
257 | b'required': True, | |
|
258 | b'type': b'bytes' | |
|
259 | } | |
|
260 | }, | |
|
261 | b'permissions': [ | |
|
262 | b'pull' | |
|
263 | ] | |
|
264 | }, | |
|
265 | b'manifestdata': { | |
|
266 | b'args': { | |
|
267 | b'fields': { | |
|
268 | b'default': set([]), | |
|
269 | b'required': False, | |
|
270 | b'type': b'set', | |
|
271 | b'validvalues': set([ | |
|
272 | b'parents', | |
|
273 | b'revision' | |
|
274 | ]) | |
|
275 | }, | |
|
276 | b'haveparents': { | |
|
277 | b'default': False, | |
|
278 | b'required': False, | |
|
279 | b'type': b'bool' | |
|
280 | }, | |
|
281 | b'nodes': { | |
|
282 | b'required': True, | |
|
283 | b'type': b'list' | |
|
284 | }, | |
|
285 | b'tree': { | |
|
286 | b'required': True, | |
|
287 | b'type': b'bytes' | |
|
288 | } | |
|
289 | }, | |
|
290 | b'permissions': [ | |
|
291 | b'pull' | |
|
292 | ], | |
|
293 | b'recommendedbatchsize': 100000 | |
|
294 | }, | |
|
295 | b'pushkey': { | |
|
296 | b'args': { | |
|
297 | b'key': { | |
|
298 | b'required': True, | |
|
299 | b'type': b'bytes' | |
|
300 | }, | |
|
301 | b'namespace': { | |
|
302 | b'required': True, | |
|
303 | b'type': b'bytes' | |
|
304 | }, | |
|
305 | b'new': { | |
|
306 | b'required': True, | |
|
307 | b'type': b'bytes' | |
|
308 | }, | |
|
309 | b'old': { | |
|
310 | b'required': True, | |
|
311 | b'type': b'bytes' | |
|
312 | } | |
|
313 | }, | |
|
314 | b'permissions': [ | |
|
315 | b'push' | |
|
316 | ] | |
|
317 | }, | |
|
318 | b'rawstorefiledata': { | |
|
319 | b'args': { | |
|
320 | b'files': { | |
|
321 | b'required': True, | |
|
322 | b'type': b'list' | |
|
323 | }, | |
|
324 | b'pathfilter': { | |
|
325 | b'default': None, | |
|
326 | b'required': False, | |
|
327 | b'type': b'list' | |
|
328 | } | |
|
329 | }, | |
|
330 | b'permissions': [ | |
|
331 | b'pull' | |
|
332 | ] | |
|
333 | } | |
|
334 | }, | |
|
335 | b'framingmediatypes': [ | |
|
336 | b'application/mercurial-exp-framing-0006' | |
|
337 | ], | |
|
338 | b'pathfilterprefixes': set([ | |
|
339 | b'path:', | |
|
340 | b'rootfilesin:' | |
|
341 | ]), | |
|
342 | b'rawrepoformats': [ | |
|
343 | b'generaldelta', | |
|
344 | b'revlogv1', | |
|
345 | b'sparserevlog' | |
|
346 | ], | |
|
347 | b'redirect': { | |
|
348 | b'hashes': [ | |
|
349 | b'sha256', | |
|
350 | b'sha1' | |
|
351 | ], | |
|
352 | b'targets': [ | |
|
353 | { | |
|
354 | b'name': b'target-a', | |
|
355 | b'protocol': b'http', | |
|
356 | b'snirequired': False, | |
|
357 | b'tlsversions': [ | |
|
358 | b'1.2', | |
|
359 | b'1.3' | |
|
360 | ], | |
|
361 | b'uris': [ | |
|
362 | b'http://example.com/' | |
|
363 | ] | |
|
364 | } | |
|
365 | ] | |
|
366 | } | |
|
367 | } | |
|
368 | ] | |
|
369 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
|
370 | ||
|
371 | Unknown protocol is filtered from compatible targets | |
|
372 | ||
|
373 | $ cat > redirects.py << EOF | |
|
374 | > [ | |
|
375 | > { | |
|
376 | > b'name': b'target-a', | |
|
377 | > b'protocol': b'http', | |
|
378 | > b'uris': [b'http://example.com/'], | |
|
379 | > }, | |
|
380 | > { | |
|
381 | > b'name': b'target-b', | |
|
382 | > b'protocol': b'unknown', | |
|
383 | > b'uris': [b'unknown://example.com/'], | |
|
384 | > }, | |
|
385 | > ] | |
|
386 | > EOF | |
|
387 | ||
|
388 | $ sendhttpv2peerhandshake << EOF | |
|
389 | > command capabilities | |
|
390 | > EOF | |
|
391 | creating http peer for wire protocol version 2 | |
|
392 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
|
393 | s> Accept-Encoding: identity\r\n | |
|
394 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
|
395 | s> x-hgproto-1: cbor\r\n | |
|
396 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
|
397 | s> accept: application/mercurial-0.1\r\n | |
|
398 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
399 | s> user-agent: Mercurial debugwireproto\r\n | |
|
400 | s> \r\n | |
|
401 | s> makefile('rb', None) | |
|
402 | s> HTTP/1.1 200 OK\r\n | |
|
403 | s> Server: testing stub value\r\n | |
|
404 | s> Date: $HTTP_DATE$\r\n | |
|
405 | s> Content-Type: application/mercurial-cbor\r\n | |
|
406 | s> Content-Length: 2312\r\n | |
|
407 | s> \r\n | |
|
408 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x82\xa3DnameHtarget-aHprotocolDhttpDuris\x81Shttp://example.com/\xa3DnameHtarget-bHprotocolGunknownDuris\x81Vunknown://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
409 | (remote redirect target target-a is compatible) | |
|
410 | (remote redirect target target-b uses unsupported protocol: unknown) | |
|
411 | sending capabilities command | |
|
412 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
|
413 | s> Accept-Encoding: identity\r\n | |
|
414 | s> accept: application/mercurial-exp-framing-0006\r\n | |
|
415 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
|
416 | s> content-length: 111\r\n | |
|
417 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
418 | s> user-agent: Mercurial debugwireproto\r\n | |
|
419 | s> \r\n | |
|
420 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81HidentityC\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81Htarget-a | |
|
421 | s> makefile('rb', None) | |
|
422 | s> HTTP/1.1 200 OK\r\n | |
|
423 | s> Server: testing stub value\r\n | |
|
424 | s> Date: $HTTP_DATE$\r\n | |
|
425 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
|
426 | s> Transfer-Encoding: chunked\r\n | |
|
427 | s> \r\n | |
|
428 | s> 11\r\n | |
|
429 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
|
430 | s> Hidentity | |
|
431 | s> \r\n | |
|
432 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |
|
433 | s> 13\r\n | |
|
434 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
|
435 | s> \xa1FstatusBok | |
|
436 | s> \r\n | |
|
437 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
438 | s> 6f9\r\n | |
|
439 | s> \xf1\x06\x00\x01\x00\x02\x041 | |
|
440 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x82\xa3DnameHtarget-aHprotocolDhttpDuris\x81Shttp://example.com/\xa3DnameHtarget-bHprotocolGunknownDuris\x81Vunknown://example.com/ | |
|
441 | s> \r\n | |
|
442 | received frame(size=1777; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
443 | s> 8\r\n | |
|
444 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
445 | s> \r\n | |
|
446 | s> 0\r\n | |
|
447 | s> \r\n | |
|
448 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
449 | response: gen[ | |
|
450 | { | |
|
451 | b'commands': { | |
|
452 | b'branchmap': { | |
|
453 | b'args': {}, | |
|
454 | b'permissions': [ | |
|
455 | b'pull' | |
|
456 | ] | |
|
457 | }, | |
|
458 | b'capabilities': { | |
|
459 | b'args': {}, | |
|
460 | b'permissions': [ | |
|
461 | b'pull' | |
|
462 | ] | |
|
463 | }, | |
|
464 | b'changesetdata': { | |
|
465 | b'args': { | |
|
466 | b'fields': { | |
|
467 | b'default': set([]), | |
|
468 | b'required': False, | |
|
469 | b'type': b'set', | |
|
470 | b'validvalues': set([ | |
|
471 | b'bookmarks', | |
|
472 | b'parents', | |
|
473 | b'phase', | |
|
474 | b'revision' | |
|
475 | ]) | |
|
476 | }, | |
|
477 | b'revisions': { | |
|
478 | b'required': True, | |
|
479 | b'type': b'list' | |
|
480 | } | |
|
481 | }, | |
|
482 | b'permissions': [ | |
|
483 | b'pull' | |
|
484 | ] | |
|
485 | }, | |
|
486 | b'filedata': { | |
|
487 | b'args': { | |
|
488 | b'fields': { | |
|
489 | b'default': set([]), | |
|
490 | b'required': False, | |
|
491 | b'type': b'set', | |
|
492 | b'validvalues': set([ | |
|
493 | b'linknode', | |
|
494 | b'parents', | |
|
495 | b'revision' | |
|
496 | ]) | |
|
497 | }, | |
|
498 | b'haveparents': { | |
|
499 | b'default': False, | |
|
500 | b'required': False, | |
|
501 | b'type': b'bool' | |
|
502 | }, | |
|
503 | b'nodes': { | |
|
504 | b'required': True, | |
|
505 | b'type': b'list' | |
|
506 | }, | |
|
507 | b'path': { | |
|
508 | b'required': True, | |
|
509 | b'type': b'bytes' | |
|
510 | } | |
|
511 | }, | |
|
512 | b'permissions': [ | |
|
513 | b'pull' | |
|
514 | ] | |
|
515 | }, | |
|
516 | b'filesdata': { | |
|
517 | b'args': { | |
|
518 | b'fields': { | |
|
519 | b'default': set([]), | |
|
520 | b'required': False, | |
|
521 | b'type': b'set', | |
|
522 | b'validvalues': set([ | |
|
523 | b'firstchangeset', | |
|
524 | b'linknode', | |
|
525 | b'parents', | |
|
526 | b'revision' | |
|
527 | ]) | |
|
528 | }, | |
|
529 | b'haveparents': { | |
|
530 | b'default': False, | |
|
531 | b'required': False, | |
|
532 | b'type': b'bool' | |
|
533 | }, | |
|
534 | b'pathfilter': { | |
|
535 | b'default': None, | |
|
536 | b'required': False, | |
|
537 | b'type': b'dict' | |
|
538 | }, | |
|
539 | b'revisions': { | |
|
540 | b'required': True, | |
|
541 | b'type': b'list' | |
|
542 | } | |
|
543 | }, | |
|
544 | b'permissions': [ | |
|
545 | b'pull' | |
|
546 | ], | |
|
547 | b'recommendedbatchsize': 50000 | |
|
548 | }, | |
|
549 | b'heads': { | |
|
550 | b'args': { | |
|
551 | b'publiconly': { | |
|
552 | b'default': False, | |
|
553 | b'required': False, | |
|
554 | b'type': b'bool' | |
|
555 | } | |
|
556 | }, | |
|
557 | b'permissions': [ | |
|
558 | b'pull' | |
|
559 | ] | |
|
560 | }, | |
|
561 | b'known': { | |
|
562 | b'args': { | |
|
563 | b'nodes': { | |
|
564 | b'default': [], | |
|
565 | b'required': False, | |
|
566 | b'type': b'list' | |
|
567 | } | |
|
568 | }, | |
|
569 | b'permissions': [ | |
|
570 | b'pull' | |
|
571 | ] | |
|
572 | }, | |
|
573 | b'listkeys': { | |
|
574 | b'args': { | |
|
575 | b'namespace': { | |
|
576 | b'required': True, | |
|
577 | b'type': b'bytes' | |
|
578 | } | |
|
579 | }, | |
|
580 | b'permissions': [ | |
|
581 | b'pull' | |
|
582 | ] | |
|
583 | }, | |
|
584 | b'lookup': { | |
|
585 | b'args': { | |
|
586 | b'key': { | |
|
587 | b'required': True, | |
|
588 | b'type': b'bytes' | |
|
589 | } | |
|
590 | }, | |
|
591 | b'permissions': [ | |
|
592 | b'pull' | |
|
593 | ] | |
|
594 | }, | |
|
595 | b'manifestdata': { | |
|
596 | b'args': { | |
|
597 | b'fields': { | |
|
598 | b'default': set([]), | |
|
599 | b'required': False, | |
|
600 | b'type': b'set', | |
|
601 | b'validvalues': set([ | |
|
602 | b'parents', | |
|
603 | b'revision' | |
|
604 | ]) | |
|
605 | }, | |
|
606 | b'haveparents': { | |
|
607 | b'default': False, | |
|
608 | b'required': False, | |
|
609 | b'type': b'bool' | |
|
610 | }, | |
|
611 | b'nodes': { | |
|
612 | b'required': True, | |
|
613 | b'type': b'list' | |
|
614 | }, | |
|
615 | b'tree': { | |
|
616 | b'required': True, | |
|
617 | b'type': b'bytes' | |
|
618 | } | |
|
619 | }, | |
|
620 | b'permissions': [ | |
|
621 | b'pull' | |
|
622 | ], | |
|
623 | b'recommendedbatchsize': 100000 | |
|
624 | }, | |
|
625 | b'pushkey': { | |
|
626 | b'args': { | |
|
627 | b'key': { | |
|
628 | b'required': True, | |
|
629 | b'type': b'bytes' | |
|
630 | }, | |
|
631 | b'namespace': { | |
|
632 | b'required': True, | |
|
633 | b'type': b'bytes' | |
|
634 | }, | |
|
635 | b'new': { | |
|
636 | b'required': True, | |
|
637 | b'type': b'bytes' | |
|
638 | }, | |
|
639 | b'old': { | |
|
640 | b'required': True, | |
|
641 | b'type': b'bytes' | |
|
642 | } | |
|
643 | }, | |
|
644 | b'permissions': [ | |
|
645 | b'push' | |
|
646 | ] | |
|
647 | }, | |
|
648 | b'rawstorefiledata': { | |
|
649 | b'args': { | |
|
650 | b'files': { | |
|
651 | b'required': True, | |
|
652 | b'type': b'list' | |
|
653 | }, | |
|
654 | b'pathfilter': { | |
|
655 | b'default': None, | |
|
656 | b'required': False, | |
|
657 | b'type': b'list' | |
|
658 | } | |
|
659 | }, | |
|
660 | b'permissions': [ | |
|
661 | b'pull' | |
|
662 | ] | |
|
663 | } | |
|
664 | }, | |
|
665 | b'framingmediatypes': [ | |
|
666 | b'application/mercurial-exp-framing-0006' | |
|
667 | ], | |
|
668 | b'pathfilterprefixes': set([ | |
|
669 | b'path:', | |
|
670 | b'rootfilesin:' | |
|
671 | ]), | |
|
672 | b'rawrepoformats': [ | |
|
673 | b'generaldelta', | |
|
674 | b'revlogv1', | |
|
675 | b'sparserevlog' | |
|
676 | ], | |
|
677 | b'redirect': { | |
|
678 | b'hashes': [ | |
|
679 | b'sha256', | |
|
680 | b'sha1' | |
|
681 | ], | |
|
682 | b'targets': [ | |
|
683 | { | |
|
684 | b'name': b'target-a', | |
|
685 | b'protocol': b'http', | |
|
686 | b'uris': [ | |
|
687 | b'http://example.com/' | |
|
688 | ] | |
|
689 | }, | |
|
690 | { | |
|
691 | b'name': b'target-b', | |
|
692 | b'protocol': b'unknown', | |
|
693 | b'uris': [ | |
|
694 | b'unknown://example.com/' | |
|
695 | ] | |
|
696 | } | |
|
697 | ] | |
|
698 | } | |
|
699 | } | |
|
700 | ] | |
|
701 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
|
702 | ||
|
703 | Missing SNI support filters targets that require SNI | |
|
704 | ||
|
705 | $ cat > nosni.py << EOF | |
|
706 | > from mercurial import sslutil | |
|
707 | > sslutil.hassni = False | |
|
708 | > EOF | |
|
709 | $ cat >> $HGRCPATH << EOF | |
|
710 | > [extensions] | |
|
711 | > nosni=`pwd`/nosni.py | |
|
712 | > EOF | |
|
713 | ||
|
714 | $ cat > redirects.py << EOF | |
|
715 | > [ | |
|
716 | > { | |
|
717 | > b'name': b'target-bad-tls', | |
|
718 | > b'protocol': b'https', | |
|
719 | > b'uris': [b'https://example.com/'], | |
|
720 | > b'snirequired': True, | |
|
721 | > }, | |
|
722 | > ] | |
|
723 | > EOF | |
|
724 | ||
|
725 | $ sendhttpv2peerhandshake << EOF | |
|
726 | > command capabilities | |
|
727 | > EOF | |
|
728 | creating http peer for wire protocol version 2 | |
|
729 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
|
730 | s> Accept-Encoding: identity\r\n | |
|
731 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
|
732 | s> x-hgproto-1: cbor\r\n | |
|
733 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
|
734 | s> accept: application/mercurial-0.1\r\n | |
|
735 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
736 | s> user-agent: Mercurial debugwireproto\r\n | |
|
737 | s> \r\n | |
|
738 | s> makefile('rb', None) | |
|
739 | s> HTTP/1.1 200 OK\r\n | |
|
740 | s> Server: testing stub value\r\n | |
|
741 | s> Date: $HTTP_DATE$\r\n | |
|
742 | s> Content-Type: application/mercurial-cbor\r\n | |
|
743 | s> Content-Length: 2272\r\n | |
|
744 | s> \r\n | |
|
745 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
746 | (redirect target target-bad-tls requires SNI, which is unsupported) | |
|
747 | sending capabilities command | |
|
748 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
|
749 | s> Accept-Encoding: identity\r\n | |
|
750 | s> accept: application/mercurial-exp-framing-0006\r\n | |
|
751 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
|
752 | s> content-length: 102\r\n | |
|
753 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
754 | s> user-agent: Mercurial debugwireproto\r\n | |
|
755 | s> \r\n | |
|
756 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |
|
757 | s> makefile('rb', None) | |
|
758 | s> HTTP/1.1 200 OK\r\n | |
|
759 | s> Server: testing stub value\r\n | |
|
760 | s> Date: $HTTP_DATE$\r\n | |
|
761 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
|
762 | s> Transfer-Encoding: chunked\r\n | |
|
763 | s> \r\n | |
|
764 | s> 11\r\n | |
|
765 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
|
766 | s> Hidentity | |
|
767 | s> \r\n | |
|
768 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |
|
769 | s> 13\r\n | |
|
770 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
|
771 | s> \xa1FstatusBok | |
|
772 | s> \r\n | |
|
773 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
102 | 774 | s> 6d1\r\n |
|
103 | 775 | s> \xc9\x06\x00\x01\x00\x02\x041 |
|
104 |
s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
|
776 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/ | |
|
105 | 777 | s> \r\n |
|
106 | 778 | received frame(size=1737; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
107 | 779 | s> 8\r\n |
|
108 | 780 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
109 | 781 | s> \r\n |
|
110 | 782 | s> 0\r\n |
|
111 | 783 | s> \r\n |
|
112 | 784 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
113 | 785 | response: gen[ |
|
114 | 786 | { |
|
115 | 787 | b'commands': { |
|
116 | 788 | b'branchmap': { |
|
117 | 789 | b'args': {}, |
|
118 | 790 | b'permissions': [ |
|
119 | 791 | b'pull' |
|
120 | 792 | ] |
|
121 | 793 | }, |
|
122 | 794 | b'capabilities': { |
|
123 | 795 | b'args': {}, |
|
124 | 796 | b'permissions': [ |
|
125 | 797 | b'pull' |
|
126 | 798 | ] |
|
127 | 799 | }, |
|
128 | 800 | b'changesetdata': { |
|
129 | 801 | b'args': { |
|
130 | 802 | b'fields': { |
|
131 | 803 | b'default': set([]), |
|
132 | 804 | b'required': False, |
|
133 | 805 | b'type': b'set', |
|
134 | 806 | b'validvalues': set([ |
|
135 | 807 | b'bookmarks', |
|
136 | 808 | b'parents', |
|
137 | 809 | b'phase', |
|
138 | 810 | b'revision' |
|
139 | 811 | ]) |
|
140 | 812 | }, |
|
141 | 813 | b'revisions': { |
|
142 | 814 | b'required': True, |
|
143 | 815 | b'type': b'list' |
|
144 | 816 | } |
|
145 | 817 | }, |
|
146 | 818 | b'permissions': [ |
|
147 | 819 | b'pull' |
|
148 | 820 | ] |
|
149 | 821 | }, |
|
150 | 822 | b'filedata': { |
|
151 | 823 | b'args': { |
|
152 | 824 | b'fields': { |
|
153 | 825 | b'default': set([]), |
|
154 | 826 | b'required': False, |
|
155 | 827 | b'type': b'set', |
|
156 | 828 | b'validvalues': set([ |
|
157 | 829 | b'linknode', |
|
158 | 830 | b'parents', |
|
159 | 831 | b'revision' |
|
160 | 832 | ]) |
|
161 | 833 | }, |
|
162 | 834 | b'haveparents': { |
|
163 | 835 | b'default': False, |
|
164 | 836 | b'required': False, |
|
165 | 837 | b'type': b'bool' |
|
166 | 838 | }, |
|
167 | 839 | b'nodes': { |
|
168 | 840 | b'required': True, |
|
169 | 841 | b'type': b'list' |
|
170 | 842 | }, |
|
171 | 843 | b'path': { |
|
172 | 844 | b'required': True, |
|
173 | 845 | b'type': b'bytes' |
|
174 | 846 | } |
|
175 | 847 | }, |
|
176 | 848 | b'permissions': [ |
|
177 | 849 | b'pull' |
|
178 | 850 | ] |
|
179 | 851 | }, |
|
180 | 852 | b'filesdata': { |
|
181 | 853 | b'args': { |
|
182 | 854 | b'fields': { |
|
183 | 855 | b'default': set([]), |
|
184 | 856 | b'required': False, |
|
185 | 857 | b'type': b'set', |
|
186 | 858 | b'validvalues': set([ |
|
187 | 859 | b'firstchangeset', |
|
188 | 860 | b'linknode', |
|
189 | 861 | b'parents', |
|
190 | 862 | b'revision' |
|
191 | 863 | ]) |
|
192 | 864 | }, |
|
193 | 865 | b'haveparents': { |
|
194 | 866 | b'default': False, |
|
195 | 867 | b'required': False, |
|
196 | 868 | b'type': b'bool' |
|
197 | 869 | }, |
|
198 | 870 | b'pathfilter': { |
|
199 | 871 | b'default': None, |
|
200 | 872 | b'required': False, |
|
201 | 873 | b'type': b'dict' |
|
202 | 874 | }, |
|
203 | 875 | b'revisions': { |
|
204 | 876 | b'required': True, |
|
205 | 877 | b'type': b'list' |
|
206 | 878 | } |
|
207 | 879 | }, |
|
208 | 880 | b'permissions': [ |
|
209 | 881 | b'pull' |
|
210 | 882 | ], |
|
211 | 883 | b'recommendedbatchsize': 50000 |
|
212 | 884 | }, |
|
213 | 885 | b'heads': { |
|
214 | 886 | b'args': { |
|
215 | 887 | b'publiconly': { |
|
216 | 888 | b'default': False, |
|
217 | 889 | b'required': False, |
|
218 | 890 | b'type': b'bool' |
|
219 | 891 | } |
|
220 | 892 | }, |
|
221 | 893 | b'permissions': [ |
|
222 | 894 | b'pull' |
|
223 | 895 | ] |
|
224 | 896 | }, |
|
225 | 897 | b'known': { |
|
226 | 898 | b'args': { |
|
227 | 899 | b'nodes': { |
|
228 | 900 | b'default': [], |
|
229 | 901 | b'required': False, |
|
230 | 902 | b'type': b'list' |
|
231 | 903 | } |
|
232 | 904 | }, |
|
233 | 905 | b'permissions': [ |
|
234 | 906 | b'pull' |
|
235 | 907 | ] |
|
236 | 908 | }, |
|
237 | 909 | b'listkeys': { |
|
238 | 910 | b'args': { |
|
239 | 911 | b'namespace': { |
|
240 | 912 | b'required': True, |
|
241 | 913 | b'type': b'bytes' |
|
242 | 914 | } |
|
243 | 915 | }, |
|
244 | 916 | b'permissions': [ |
|
245 | 917 | b'pull' |
|
246 | 918 | ] |
|
247 | 919 | }, |
|
248 | 920 | b'lookup': { |
|
249 | 921 | b'args': { |
|
250 | 922 | b'key': { |
|
251 | 923 | b'required': True, |
|
252 | 924 | b'type': b'bytes' |
|
253 | 925 | } |
|
254 | 926 | }, |
|
255 | 927 | b'permissions': [ |
|
256 | 928 | b'pull' |
|
257 | 929 | ] |
|
258 | 930 | }, |
|
259 | 931 | b'manifestdata': { |
|
260 | 932 | b'args': { |
|
261 | 933 | b'fields': { |
|
262 | 934 | b'default': set([]), |
|
263 | 935 | b'required': False, |
|
264 | 936 | b'type': b'set', |
|
265 | 937 | b'validvalues': set([ |
|
266 | 938 | b'parents', |
|
267 | 939 | b'revision' |
|
268 | 940 | ]) |
|
269 | 941 | }, |
|
270 | 942 | b'haveparents': { |
|
271 | 943 | b'default': False, |
|
272 | 944 | b'required': False, |
|
273 | 945 | b'type': b'bool' |
|
274 | 946 | }, |
|
275 | 947 | b'nodes': { |
|
276 | 948 | b'required': True, |
|
277 | 949 | b'type': b'list' |
|
278 | 950 | }, |
|
279 | 951 | b'tree': { |
|
280 | 952 | b'required': True, |
|
281 | 953 | b'type': b'bytes' |
|
282 | 954 | } |
|
283 | 955 | }, |
|
284 | 956 | b'permissions': [ |
|
285 | 957 | b'pull' |
|
286 | 958 | ], |
|
287 | 959 | b'recommendedbatchsize': 100000 |
|
288 | 960 | }, |
|
289 | 961 | b'pushkey': { |
|
290 | 962 | b'args': { |
|
291 | 963 | b'key': { |
|
292 | 964 | b'required': True, |
|
293 | 965 | b'type': b'bytes' |
|
294 | 966 | }, |
|
295 | 967 | b'namespace': { |
|
296 | 968 | b'required': True, |
|
297 | 969 | b'type': b'bytes' |
|
298 | 970 | }, |
|
299 | 971 | b'new': { |
|
300 | 972 | b'required': True, |
|
301 | 973 | b'type': b'bytes' |
|
302 | 974 | }, |
|
303 | 975 | b'old': { |
|
304 | 976 | b'required': True, |
|
305 | 977 | b'type': b'bytes' |
|
306 | 978 | } |
|
307 | 979 | }, |
|
308 | 980 | b'permissions': [ |
|
309 | 981 | b'push' |
|
310 | 982 | ] |
|
311 | 983 | }, |
|
312 | 984 | b'rawstorefiledata': { |
|
313 | 985 | b'args': { |
|
314 | 986 | b'files': { |
|
315 | 987 | b'required': True, |
|
316 | 988 | b'type': b'list' |
|
317 | 989 | }, |
|
318 | 990 | b'pathfilter': { |
|
319 | 991 | b'default': None, |
|
320 | 992 | b'required': False, |
|
321 | 993 | b'type': b'list' |
|
322 | 994 | } |
|
323 | 995 | }, |
|
324 | 996 | b'permissions': [ |
|
325 | 997 | b'pull' |
|
326 | 998 | ] |
|
327 | 999 | } |
|
328 | 1000 | }, |
|
329 | 1001 | b'framingmediatypes': [ |
|
330 | 1002 | b'application/mercurial-exp-framing-0006' |
|
331 | 1003 | ], |
|
332 | 1004 | b'pathfilterprefixes': set([ |
|
333 | 1005 | b'path:', |
|
334 | 1006 | b'rootfilesin:' |
|
335 | 1007 | ]), |
|
336 | 1008 | b'rawrepoformats': [ |
|
337 | 1009 | b'generaldelta', |
|
338 | b'revlogv1' | |
|
1010 | b'revlogv1', | |
|
1011 | b'sparserevlog' | |
|
339 | 1012 | ], |
|
340 | 1013 | b'redirect': { |
|
341 | 1014 | b'hashes': [ |
|
342 | 1015 | b'sha256', |
|
343 | 1016 | b'sha1' |
|
344 | 1017 | ], |
|
345 | 1018 | b'targets': [ |
|
346 | 1019 | { |
|
347 | b'name': b'target-a', | |
|
348 | b'protocol': b'http', | |
|
349 |
b'snirequired': |
|
|
350 | b'tlsversions': [ | |
|
351 | b'1.2', | |
|
352 | b'1.3' | |
|
353 | ], | |
|
1020 | b'name': b'target-bad-tls', | |
|
1021 | b'protocol': b'https', | |
|
1022 | b'snirequired': True, | |
|
354 | 1023 | b'uris': [ |
|
355 | b'http://example.com/' | |
|
1024 | b'https://example.com/' | |
|
356 | 1025 | ] |
|
357 | 1026 | } |
|
358 | 1027 | ] |
|
359 | 1028 | } |
|
360 | 1029 | } |
|
361 | 1030 | ] |
|
362 | 1031 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
363 | 1032 | |
|
364 | Unknown protocol is filtered from compatible targets | |
|
1033 | $ cat >> $HGRCPATH << EOF | |
|
1034 | > [extensions] | |
|
1035 | > nosni=! | |
|
1036 | > EOF | |
|
1037 | ||
|
1038 | Unknown tls value is filtered from compatible targets | |
|
365 | 1039 | |
|
366 | 1040 | $ cat > redirects.py << EOF |
|
367 | 1041 | > [ |
|
368 | 1042 | > { |
|
369 | > b'name': b'target-a', | |
|
370 | > b'protocol': b'http', | |
|
371 | > b'uris': [b'http://example.com/'], | |
|
372 | > }, | |
|
373 | > { | |
|
374 | > b'name': b'target-b', | |
|
375 | > b'protocol': b'unknown', | |
|
376 | > b'uris': [b'unknown://example.com/'], | |
|
1043 | > b'name': b'target-bad-tls', | |
|
1044 | > b'protocol': b'https', | |
|
1045 | > b'uris': [b'https://example.com/'], | |
|
1046 | > b'tlsversions': [b'42', b'39'], | |
|
377 | 1047 | > }, |
|
378 | 1048 | > ] |
|
379 | 1049 | > EOF |
|
380 | 1050 | |
|
381 | 1051 | $ sendhttpv2peerhandshake << EOF |
|
382 | 1052 | > command capabilities |
|
383 | 1053 | > EOF |
|
384 | 1054 | creating http peer for wire protocol version 2 |
|
385 | 1055 | s> GET /?cmd=capabilities HTTP/1.1\r\n |
|
386 | 1056 | s> Accept-Encoding: identity\r\n |
|
387 | 1057 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n |
|
388 | 1058 | s> x-hgproto-1: cbor\r\n |
|
389 | 1059 | s> x-hgupgrade-1: exp-http-v2-0003\r\n |
|
390 | 1060 | s> accept: application/mercurial-0.1\r\n |
|
391 | 1061 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
392 | 1062 | s> user-agent: Mercurial debugwireproto\r\n |
|
393 | 1063 | s> \r\n |
|
394 | 1064 | s> makefile('rb', None) |
|
395 | 1065 | s> HTTP/1.1 200 OK\r\n |
|
396 | 1066 | s> Server: testing stub value\r\n |
|
397 | 1067 | s> Date: $HTTP_DATE$\r\n |
|
398 | 1068 | s> Content-Type: application/mercurial-cbor\r\n |
|
399 |
s> Content-Length: 228 |
|
|
1069 | s> Content-Length: 2278\r\n | |
|
400 | 1070 | s> \r\n |
|
401 |
s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
|
402 |
(remote redirect target target-a is |
|
|
403 | (remote redirect target target-b uses unsupported protocol: unknown) | |
|
1071 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xe0batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
1072 | (remote redirect target target-bad-tls requires unsupported TLS versions: 39, 42) | |
|
404 | 1073 | sending capabilities command |
|
405 | 1074 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n |
|
406 | 1075 | s> Accept-Encoding: identity\r\n |
|
407 | 1076 | s> accept: application/mercurial-exp-framing-0006\r\n |
|
408 | 1077 | s> content-type: application/mercurial-exp-framing-0006\r\n |
|
409 |
s> content-length: 1 |
|
|
1078 | s> content-length: 102\r\n | |
|
410 | 1079 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
411 | 1080 | s> user-agent: Mercurial debugwireproto\r\n |
|
412 | 1081 | s> \r\n |
|
413 |
s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity |
|
|
1082 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |
|
414 | 1083 | s> makefile('rb', None) |
|
415 | 1084 | s> HTTP/1.1 200 OK\r\n |
|
416 | 1085 | s> Server: testing stub value\r\n |
|
417 | 1086 | s> Date: $HTTP_DATE$\r\n |
|
418 | 1087 | s> Content-Type: application/mercurial-exp-framing-0006\r\n |
|
419 | 1088 | s> Transfer-Encoding: chunked\r\n |
|
420 | 1089 | s> \r\n |
|
421 | 1090 | s> 11\r\n |
|
422 | 1091 | s> \t\x00\x00\x01\x00\x02\x01\x92 |
|
423 | 1092 | s> Hidentity |
|
424 | 1093 | s> \r\n |
|
425 | 1094 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) |
|
426 | 1095 | s> 13\r\n |
|
427 | 1096 | s> \x0b\x00\x00\x01\x00\x02\x041 |
|
428 | 1097 | s> \xa1FstatusBok |
|
429 | 1098 | s> \r\n |
|
430 | 1099 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) |
|
431 |
s> 6 |
|
|
432 |
s> \x |
|
|
433 |
s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x8 |
|
|
1100 | s> 6d7\r\n | |
|
1101 | s> \xcf\x06\x00\x01\x00\x02\x041 | |
|
1102 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x83LgeneraldeltaHrevlogv1LsparserevlogHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/ | |
|
434 | 1103 | s> \r\n |
|
435 |
received frame(size=17 |
|
|
1104 | received frame(size=1743; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
436 | 1105 | s> 8\r\n |
|
437 | 1106 | s> \x00\x00\x00\x01\x00\x02\x002 |
|
438 | 1107 | s> \r\n |
|
439 | 1108 | s> 0\r\n |
|
440 | 1109 | s> \r\n |
|
441 | 1110 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) |
|
442 | 1111 | response: gen[ |
|
443 | 1112 | { |
|
444 | 1113 | b'commands': { |
|
445 | 1114 | b'branchmap': { |
|
446 | 1115 | b'args': {}, |
|
447 | 1116 | b'permissions': [ |
|
448 | 1117 | b'pull' |
|
449 | 1118 | ] |
|
450 | 1119 | }, |
|
451 | 1120 | b'capabilities': { |
|
452 | 1121 | b'args': {}, |
|
453 | 1122 | b'permissions': [ |
|
454 | 1123 | b'pull' |
|
455 | 1124 | ] |
|
456 | 1125 | }, |
|
457 | 1126 | b'changesetdata': { |
|
458 | 1127 | b'args': { |
|
459 | 1128 | b'fields': { |
|
460 | 1129 | b'default': set([]), |
|
461 | 1130 | b'required': False, |
|
462 | 1131 | b'type': b'set', |
|
463 | 1132 | b'validvalues': set([ |
|
464 | 1133 | b'bookmarks', |
|
465 | 1134 | b'parents', |
|
466 | 1135 | b'phase', |
|
467 | 1136 | b'revision' |
|
468 | 1137 | ]) |
|
469 | 1138 | }, |
|
470 | 1139 | b'revisions': { |
|
471 | 1140 | b'required': True, |
|
472 | 1141 | b'type': b'list' |
|
473 | 1142 | } |
|
474 | 1143 | }, |
|
475 | 1144 | b'permissions': [ |
|
476 | 1145 | b'pull' |
|
477 | 1146 | ] |
|
478 | 1147 | }, |
|
479 | 1148 | b'filedata': { |
|
480 | 1149 | b'args': { |
|
481 | 1150 | b'fields': { |
|
482 | 1151 | b'default': set([]), |
|
483 | 1152 | b'required': False, |
|
484 | 1153 | b'type': b'set', |
|
485 | 1154 | b'validvalues': set([ |
|
486 | 1155 | b'linknode', |
|
487 | 1156 | b'parents', |
|
488 | 1157 | b'revision' |
|
489 | 1158 | ]) |
|
490 | 1159 | }, |
|
491 | 1160 | b'haveparents': { |
|
492 | 1161 | b'default': False, |
|
493 | 1162 | b'required': False, |
|
494 | 1163 | b'type': b'bool' |
|
495 | 1164 | }, |
|
496 | 1165 | b'nodes': { |
|
497 | 1166 | b'required': True, |
|
498 | 1167 | b'type': b'list' |
|
499 | 1168 | }, |
|
500 | 1169 | b'path': { |
|
501 | 1170 | b'required': True, |
|
502 | 1171 | b'type': b'bytes' |
|
503 | 1172 | } |
|
504 | 1173 | }, |
|
505 | 1174 | b'permissions': [ |
|
506 | 1175 | b'pull' |
|
507 | 1176 | ] |
|
508 | 1177 | }, |
|
509 | 1178 | b'filesdata': { |
|
510 | 1179 | b'args': { |
|
511 | 1180 | b'fields': { |
|
512 | 1181 | b'default': set([]), |
|
513 | 1182 | b'required': False, |
|
514 | 1183 | b'type': b'set', |
|
515 | 1184 | b'validvalues': set([ |
|
516 | 1185 | b'firstchangeset', |
|
517 | 1186 | b'linknode', |
|
518 | 1187 | b'parents', |
|
519 | 1188 | b'revision' |
|
520 | 1189 | ]) |
|
521 | 1190 | }, |
|
522 | 1191 | b'haveparents': { |
|
523 | 1192 | b'default': False, |
|
524 | 1193 | b'required': False, |
|
525 | 1194 | b'type': b'bool' |
|
526 | 1195 | }, |
|
527 | 1196 | b'pathfilter': { |
|
528 | 1197 | b'default': None, |
|
529 | 1198 | b'required': False, |
|
530 | 1199 | b'type': b'dict' |
|
531 | 1200 | }, |
|
532 | 1201 | b'revisions': { |
|
533 | 1202 | b'required': True, |
|
534 | 1203 | b'type': b'list' |
|
535 | 1204 | } |
|
536 | 1205 | }, |
|
537 | 1206 | b'permissions': [ |
|
538 | 1207 | b'pull' |
|
539 | 1208 | ], |
|
540 | 1209 | b'recommendedbatchsize': 50000 |
|
541 | 1210 | }, |
|
542 | 1211 | b'heads': { |
|
543 | 1212 | b'args': { |
|
544 | 1213 | b'publiconly': { |
|
545 | 1214 | b'default': False, |
|
546 | 1215 | b'required': False, |
|
547 | 1216 | b'type': b'bool' |
|
548 | 1217 | } |
|
549 | 1218 | }, |
|
550 | 1219 | b'permissions': [ |
|
551 | 1220 | b'pull' |
|
552 | 1221 | ] |
|
553 | 1222 | }, |
|
554 | 1223 | b'known': { |
|
555 | 1224 | b'args': { |
|
556 | 1225 | b'nodes': { |
|
557 | 1226 | b'default': [], |
|
558 | 1227 | b'required': False, |
|
559 | 1228 | b'type': b'list' |
|
560 | 1229 | } |
|
561 | 1230 | }, |
|
562 | 1231 | b'permissions': [ |
|
563 | 1232 | b'pull' |
|
564 | 1233 | ] |
|
565 | 1234 | }, |
|
566 | 1235 | b'listkeys': { |
|
567 | 1236 | b'args': { |
|
568 | 1237 | b'namespace': { |
|
569 | 1238 | b'required': True, |
|
570 | 1239 | b'type': b'bytes' |
|
571 | 1240 | } |
|
572 | 1241 | }, |
|
573 | 1242 | b'permissions': [ |
|
574 | 1243 | b'pull' |
|
575 | 1244 | ] |
|
576 | 1245 | }, |
|
577 | 1246 | b'lookup': { |
|
578 | 1247 | b'args': { |
|
579 | 1248 | b'key': { |
|
580 | 1249 | b'required': True, |
|
581 | 1250 | b'type': b'bytes' |
|
582 | 1251 | } |
|
583 | 1252 | }, |
|
584 | 1253 | b'permissions': [ |
|
585 | 1254 | b'pull' |
|
586 | 1255 | ] |
|
587 | 1256 | }, |
|
588 | 1257 | b'manifestdata': { |
|
589 | 1258 | b'args': { |
|
590 | 1259 | b'fields': { |
|
591 | 1260 | b'default': set([]), |
|
592 | 1261 | b'required': False, |
|
593 | 1262 | b'type': b'set', |
|
594 | 1263 | b'validvalues': set([ |
|
595 | 1264 | b'parents', |
|
596 | 1265 | b'revision' |
|
597 | 1266 | ]) |
|
598 | 1267 | }, |
|
599 | 1268 | b'haveparents': { |
|
600 | 1269 | b'default': False, |
|
601 | 1270 | b'required': False, |
|
602 | 1271 | b'type': b'bool' |
|
603 | 1272 | }, |
|
604 | 1273 | b'nodes': { |
|
605 | 1274 | b'required': True, |
|
606 | 1275 | b'type': b'list' |
|
607 | 1276 | }, |
|
608 | 1277 | b'tree': { |
|
609 | 1278 | b'required': True, |
|
610 | 1279 | b'type': b'bytes' |
|
611 | 1280 | } |
|
612 | 1281 | }, |
|
613 | 1282 | b'permissions': [ |
|
614 | 1283 | b'pull' |
|
615 | 1284 | ], |
|
616 | 1285 | b'recommendedbatchsize': 100000 |
|
617 | 1286 | }, |
|
618 | 1287 | b'pushkey': { |
|
619 | 1288 | b'args': { |
|
620 | 1289 | b'key': { |
|
621 | 1290 | b'required': True, |
|
622 | 1291 | b'type': b'bytes' |
|
623 | 1292 | }, |
|
624 | 1293 | b'namespace': { |
|
625 | 1294 | b'required': True, |
|
626 | 1295 | b'type': b'bytes' |
|
627 | 1296 | }, |
|
628 | 1297 | b'new': { |
|
629 | 1298 | b'required': True, |
|
630 | 1299 | b'type': b'bytes' |
|
631 | 1300 | }, |
|
632 | 1301 | b'old': { |
|
633 | 1302 | b'required': True, |
|
634 | 1303 | b'type': b'bytes' |
|
635 | 1304 | } |
|
636 | 1305 | }, |
|
637 | 1306 | b'permissions': [ |
|
638 | 1307 | b'push' |
|
639 | 1308 | ] |
|
640 | 1309 | }, |
|
641 | 1310 | b'rawstorefiledata': { |
|
642 | 1311 | b'args': { |
|
643 | 1312 | b'files': { |
|
644 | 1313 | b'required': True, |
|
645 | 1314 | b'type': b'list' |
|
646 | 1315 | }, |
|
647 | 1316 | b'pathfilter': { |
|
648 | 1317 | b'default': None, |
|
649 | 1318 | b'required': False, |
|
650 | 1319 | b'type': b'list' |
|
651 | 1320 | } |
|
652 | 1321 | }, |
|
653 | 1322 | b'permissions': [ |
|
654 | 1323 | b'pull' |
|
655 | 1324 | ] |
|
656 | 1325 | } |
|
657 | 1326 | }, |
|
658 | 1327 | b'framingmediatypes': [ |
|
659 | 1328 | b'application/mercurial-exp-framing-0006' |
|
660 | 1329 | ], |
|
661 | 1330 | b'pathfilterprefixes': set([ |
|
662 | 1331 | b'path:', |
|
663 | 1332 | b'rootfilesin:' |
|
664 | 1333 | ]), |
|
665 | 1334 | b'rawrepoformats': [ |
|
666 | 1335 | b'generaldelta', |
|
667 | b'revlogv1' | |
|
668 | ], | |
|
669 | b'redirect': { | |
|
670 | b'hashes': [ | |
|
671 | b'sha256', | |
|
672 | b'sha1' | |
|
673 | ], | |
|
674 | b'targets': [ | |
|
675 | { | |
|
676 | b'name': b'target-a', | |
|
677 | b'protocol': b'http', | |
|
678 | b'uris': [ | |
|
679 | b'http://example.com/' | |
|
680 | ] | |
|
681 | }, | |
|
682 | { | |
|
683 | b'name': b'target-b', | |
|
684 | b'protocol': b'unknown', | |
|
685 | b'uris': [ | |
|
686 | b'unknown://example.com/' | |
|
687 | ] | |
|
688 | } | |
|
689 | ] | |
|
690 | } | |
|
691 | } | |
|
692 | ] | |
|
693 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
|
694 | ||
|
695 | Missing SNI support filters targets that require SNI | |
|
696 | ||
|
697 | $ cat > nosni.py << EOF | |
|
698 | > from mercurial import sslutil | |
|
699 | > sslutil.hassni = False | |
|
700 | > EOF | |
|
701 | $ cat >> $HGRCPATH << EOF | |
|
702 | > [extensions] | |
|
703 | > nosni=`pwd`/nosni.py | |
|
704 | > EOF | |
|
705 | ||
|
706 | $ cat > redirects.py << EOF | |
|
707 | > [ | |
|
708 | > { | |
|
709 | > b'name': b'target-bad-tls', | |
|
710 | > b'protocol': b'https', | |
|
711 | > b'uris': [b'https://example.com/'], | |
|
712 | > b'snirequired': True, | |
|
713 | > }, | |
|
714 | > ] | |
|
715 | > EOF | |
|
716 | ||
|
717 | $ sendhttpv2peerhandshake << EOF | |
|
718 | > command capabilities | |
|
719 | > EOF | |
|
720 | creating http peer for wire protocol version 2 | |
|
721 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
|
722 | s> Accept-Encoding: identity\r\n | |
|
723 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
|
724 | s> x-hgproto-1: cbor\r\n | |
|
725 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
|
726 | s> accept: application/mercurial-0.1\r\n | |
|
727 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
728 | s> user-agent: Mercurial debugwireproto\r\n | |
|
729 | s> \r\n | |
|
730 | s> makefile('rb', None) | |
|
731 | s> HTTP/1.1 200 OK\r\n | |
|
732 | s> Server: testing stub value\r\n | |
|
733 | s> Date: $HTTP_DATE$\r\n | |
|
734 | s> Content-Type: application/mercurial-cbor\r\n | |
|
735 | s> Content-Length: 2246\r\n | |
|
736 | s> \r\n | |
|
737 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
738 | (redirect target target-bad-tls requires SNI, which is unsupported) | |
|
739 | sending capabilities command | |
|
740 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
|
741 | s> Accept-Encoding: identity\r\n | |
|
742 | s> accept: application/mercurial-exp-framing-0006\r\n | |
|
743 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
|
744 | s> content-length: 102\r\n | |
|
745 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
746 | s> user-agent: Mercurial debugwireproto\r\n | |
|
747 | s> \r\n | |
|
748 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |
|
749 | s> makefile('rb', None) | |
|
750 | s> HTTP/1.1 200 OK\r\n | |
|
751 | s> Server: testing stub value\r\n | |
|
752 | s> Date: $HTTP_DATE$\r\n | |
|
753 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
|
754 | s> Transfer-Encoding: chunked\r\n | |
|
755 | s> \r\n | |
|
756 | s> 11\r\n | |
|
757 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
|
758 | s> Hidentity | |
|
759 | s> \r\n | |
|
760 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |
|
761 | s> 13\r\n | |
|
762 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
|
763 | s> \xa1FstatusBok | |
|
764 | s> \r\n | |
|
765 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
766 | s> 6c4\r\n | |
|
767 | s> \xbc\x06\x00\x01\x00\x02\x041 | |
|
768 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKsnirequired\xf5Duris\x81Thttps://example.com/ | |
|
769 | s> \r\n | |
|
770 | received frame(size=1724; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
771 | s> 8\r\n | |
|
772 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
773 | s> \r\n | |
|
774 | s> 0\r\n | |
|
775 | s> \r\n | |
|
776 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
777 | response: gen[ | |
|
778 | { | |
|
779 | b'commands': { | |
|
780 | b'branchmap': { | |
|
781 | b'args': {}, | |
|
782 | b'permissions': [ | |
|
783 | b'pull' | |
|
784 | ] | |
|
785 | }, | |
|
786 | b'capabilities': { | |
|
787 | b'args': {}, | |
|
788 | b'permissions': [ | |
|
789 | b'pull' | |
|
790 | ] | |
|
791 | }, | |
|
792 | b'changesetdata': { | |
|
793 | b'args': { | |
|
794 | b'fields': { | |
|
795 | b'default': set([]), | |
|
796 | b'required': False, | |
|
797 | b'type': b'set', | |
|
798 | b'validvalues': set([ | |
|
799 | b'bookmarks', | |
|
800 | b'parents', | |
|
801 | b'phase', | |
|
802 | b'revision' | |
|
803 | ]) | |
|
804 | }, | |
|
805 | b'revisions': { | |
|
806 | b'required': True, | |
|
807 | b'type': b'list' | |
|
808 | } | |
|
809 | }, | |
|
810 | b'permissions': [ | |
|
811 | b'pull' | |
|
812 | ] | |
|
813 | }, | |
|
814 | b'filedata': { | |
|
815 | b'args': { | |
|
816 | b'fields': { | |
|
817 | b'default': set([]), | |
|
818 | b'required': False, | |
|
819 | b'type': b'set', | |
|
820 | b'validvalues': set([ | |
|
821 | b'linknode', | |
|
822 | b'parents', | |
|
823 | b'revision' | |
|
824 | ]) | |
|
825 | }, | |
|
826 | b'haveparents': { | |
|
827 | b'default': False, | |
|
828 | b'required': False, | |
|
829 | b'type': b'bool' | |
|
830 | }, | |
|
831 | b'nodes': { | |
|
832 | b'required': True, | |
|
833 | b'type': b'list' | |
|
834 | }, | |
|
835 | b'path': { | |
|
836 | b'required': True, | |
|
837 | b'type': b'bytes' | |
|
838 | } | |
|
839 | }, | |
|
840 | b'permissions': [ | |
|
841 | b'pull' | |
|
842 | ] | |
|
843 | }, | |
|
844 | b'filesdata': { | |
|
845 | b'args': { | |
|
846 | b'fields': { | |
|
847 | b'default': set([]), | |
|
848 | b'required': False, | |
|
849 | b'type': b'set', | |
|
850 | b'validvalues': set([ | |
|
851 | b'firstchangeset', | |
|
852 | b'linknode', | |
|
853 | b'parents', | |
|
854 | b'revision' | |
|
855 | ]) | |
|
856 | }, | |
|
857 | b'haveparents': { | |
|
858 | b'default': False, | |
|
859 | b'required': False, | |
|
860 | b'type': b'bool' | |
|
861 | }, | |
|
862 | b'pathfilter': { | |
|
863 | b'default': None, | |
|
864 | b'required': False, | |
|
865 | b'type': b'dict' | |
|
866 | }, | |
|
867 | b'revisions': { | |
|
868 | b'required': True, | |
|
869 | b'type': b'list' | |
|
870 | } | |
|
871 | }, | |
|
872 | b'permissions': [ | |
|
873 | b'pull' | |
|
874 | ], | |
|
875 | b'recommendedbatchsize': 50000 | |
|
876 | }, | |
|
877 | b'heads': { | |
|
878 | b'args': { | |
|
879 | b'publiconly': { | |
|
880 | b'default': False, | |
|
881 | b'required': False, | |
|
882 | b'type': b'bool' | |
|
883 | } | |
|
884 | }, | |
|
885 | b'permissions': [ | |
|
886 | b'pull' | |
|
887 | ] | |
|
888 | }, | |
|
889 | b'known': { | |
|
890 | b'args': { | |
|
891 | b'nodes': { | |
|
892 | b'default': [], | |
|
893 | b'required': False, | |
|
894 | b'type': b'list' | |
|
895 | } | |
|
896 | }, | |
|
897 | b'permissions': [ | |
|
898 | b'pull' | |
|
899 | ] | |
|
900 | }, | |
|
901 | b'listkeys': { | |
|
902 | b'args': { | |
|
903 | b'namespace': { | |
|
904 | b'required': True, | |
|
905 | b'type': b'bytes' | |
|
906 | } | |
|
907 | }, | |
|
908 | b'permissions': [ | |
|
909 | b'pull' | |
|
910 | ] | |
|
911 | }, | |
|
912 | b'lookup': { | |
|
913 | b'args': { | |
|
914 | b'key': { | |
|
915 | b'required': True, | |
|
916 | b'type': b'bytes' | |
|
917 | } | |
|
918 | }, | |
|
919 | b'permissions': [ | |
|
920 | b'pull' | |
|
921 | ] | |
|
922 | }, | |
|
923 | b'manifestdata': { | |
|
924 | b'args': { | |
|
925 | b'fields': { | |
|
926 | b'default': set([]), | |
|
927 | b'required': False, | |
|
928 | b'type': b'set', | |
|
929 | b'validvalues': set([ | |
|
930 | b'parents', | |
|
931 | b'revision' | |
|
932 | ]) | |
|
933 | }, | |
|
934 | b'haveparents': { | |
|
935 | b'default': False, | |
|
936 | b'required': False, | |
|
937 | b'type': b'bool' | |
|
938 | }, | |
|
939 | b'nodes': { | |
|
940 | b'required': True, | |
|
941 | b'type': b'list' | |
|
942 | }, | |
|
943 | b'tree': { | |
|
944 | b'required': True, | |
|
945 | b'type': b'bytes' | |
|
946 | } | |
|
947 | }, | |
|
948 | b'permissions': [ | |
|
949 | b'pull' | |
|
950 | ], | |
|
951 | b'recommendedbatchsize': 100000 | |
|
952 | }, | |
|
953 | b'pushkey': { | |
|
954 | b'args': { | |
|
955 | b'key': { | |
|
956 | b'required': True, | |
|
957 | b'type': b'bytes' | |
|
958 | }, | |
|
959 | b'namespace': { | |
|
960 | b'required': True, | |
|
961 | b'type': b'bytes' | |
|
962 | }, | |
|
963 | b'new': { | |
|
964 | b'required': True, | |
|
965 | b'type': b'bytes' | |
|
966 | }, | |
|
967 | b'old': { | |
|
968 | b'required': True, | |
|
969 | b'type': b'bytes' | |
|
970 | } | |
|
971 | }, | |
|
972 | b'permissions': [ | |
|
973 | b'push' | |
|
974 | ] | |
|
975 | }, | |
|
976 | b'rawstorefiledata': { | |
|
977 | b'args': { | |
|
978 | b'files': { | |
|
979 | b'required': True, | |
|
980 | b'type': b'list' | |
|
981 | }, | |
|
982 | b'pathfilter': { | |
|
983 | b'default': None, | |
|
984 | b'required': False, | |
|
985 | b'type': b'list' | |
|
986 | } | |
|
987 | }, | |
|
988 | b'permissions': [ | |
|
989 | b'pull' | |
|
990 | ] | |
|
991 | } | |
|
992 | }, | |
|
993 | b'framingmediatypes': [ | |
|
994 | b'application/mercurial-exp-framing-0006' | |
|
995 | ], | |
|
996 | b'pathfilterprefixes': set([ | |
|
997 | b'path:', | |
|
998 | b'rootfilesin:' | |
|
999 | ]), | |
|
1000 | b'rawrepoformats': [ | |
|
1001 | b'generaldelta', | |
|
1002 | b'revlogv1' | |
|
1003 | ], | |
|
1004 | b'redirect': { | |
|
1005 | b'hashes': [ | |
|
1006 | b'sha256', | |
|
1007 | b'sha1' | |
|
1008 | ], | |
|
1009 | b'targets': [ | |
|
1010 | { | |
|
1011 | b'name': b'target-bad-tls', | |
|
1012 | b'protocol': b'https', | |
|
1013 | b'snirequired': True, | |
|
1014 | b'uris': [ | |
|
1015 | b'https://example.com/' | |
|
1016 | ] | |
|
1017 | } | |
|
1018 | ] | |
|
1019 | } | |
|
1020 | } | |
|
1021 | ] | |
|
1022 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) | |
|
1023 | ||
|
1024 | $ cat >> $HGRCPATH << EOF | |
|
1025 | > [extensions] | |
|
1026 | > nosni=! | |
|
1027 | > EOF | |
|
1028 | ||
|
1029 | Unknown tls value is filtered from compatible targets | |
|
1030 | ||
|
1031 | $ cat > redirects.py << EOF | |
|
1032 | > [ | |
|
1033 | > { | |
|
1034 | > b'name': b'target-bad-tls', | |
|
1035 | > b'protocol': b'https', | |
|
1036 | > b'uris': [b'https://example.com/'], | |
|
1037 | > b'tlsversions': [b'42', b'39'], | |
|
1038 | > }, | |
|
1039 | > ] | |
|
1040 | > EOF | |
|
1041 | ||
|
1042 | $ sendhttpv2peerhandshake << EOF | |
|
1043 | > command capabilities | |
|
1044 | > EOF | |
|
1045 | creating http peer for wire protocol version 2 | |
|
1046 | s> GET /?cmd=capabilities HTTP/1.1\r\n | |
|
1047 | s> Accept-Encoding: identity\r\n | |
|
1048 | s> vary: X-HgProto-1,X-HgUpgrade-1\r\n | |
|
1049 | s> x-hgproto-1: cbor\r\n | |
|
1050 | s> x-hgupgrade-1: exp-http-v2-0003\r\n | |
|
1051 | s> accept: application/mercurial-0.1\r\n | |
|
1052 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
1053 | s> user-agent: Mercurial debugwireproto\r\n | |
|
1054 | s> \r\n | |
|
1055 | s> makefile('rb', None) | |
|
1056 | s> HTTP/1.1 200 OK\r\n | |
|
1057 | s> Server: testing stub value\r\n | |
|
1058 | s> Date: $HTTP_DATE$\r\n | |
|
1059 | s> Content-Type: application/mercurial-cbor\r\n | |
|
1060 | s> Content-Length: 2252\r\n | |
|
1061 | s> \r\n | |
|
1062 | s> \xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/Nv1capabilitiesY\x01\xd3batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash | |
|
1063 | (remote redirect target target-bad-tls requires unsupported TLS versions: 39, 42) | |
|
1064 | sending capabilities command | |
|
1065 | s> POST /api/exp-http-v2-0003/ro/capabilities HTTP/1.1\r\n | |
|
1066 | s> Accept-Encoding: identity\r\n | |
|
1067 | s> accept: application/mercurial-exp-framing-0006\r\n | |
|
1068 | s> content-type: application/mercurial-exp-framing-0006\r\n | |
|
1069 | s> content-length: 102\r\n | |
|
1070 | s> host: $LOCALIP:$HGPORT\r\n (glob) | |
|
1071 | s> user-agent: Mercurial debugwireproto\r\n | |
|
1072 | s> \r\n | |
|
1073 | s> \x1c\x00\x00\x01\x00\x01\x01\x82\xa1Pcontentencodings\x81Hidentity:\x00\x00\x01\x00\x01\x00\x11\xa2DnameLcapabilitiesHredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x80 | |
|
1074 | s> makefile('rb', None) | |
|
1075 | s> HTTP/1.1 200 OK\r\n | |
|
1076 | s> Server: testing stub value\r\n | |
|
1077 | s> Date: $HTTP_DATE$\r\n | |
|
1078 | s> Content-Type: application/mercurial-exp-framing-0006\r\n | |
|
1079 | s> Transfer-Encoding: chunked\r\n | |
|
1080 | s> \r\n | |
|
1081 | s> 11\r\n | |
|
1082 | s> \t\x00\x00\x01\x00\x02\x01\x92 | |
|
1083 | s> Hidentity | |
|
1084 | s> \r\n | |
|
1085 | received frame(size=9; request=1; stream=2; streamflags=stream-begin; type=stream-settings; flags=eos) | |
|
1086 | s> 13\r\n | |
|
1087 | s> \x0b\x00\x00\x01\x00\x02\x041 | |
|
1088 | s> \xa1FstatusBok | |
|
1089 | s> \r\n | |
|
1090 | received frame(size=11; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
1091 | s> 6ca\r\n | |
|
1092 | s> \xc2\x06\x00\x01\x00\x02\x041 | |
|
1093 | s> \xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X&application/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa4DnameNtarget-bad-tlsHprotocolEhttpsKtlsversions\x82B42B39Duris\x81Thttps://example.com/ | |
|
1094 | s> \r\n | |
|
1095 | received frame(size=1730; request=1; stream=2; streamflags=encoded; type=command-response; flags=continuation) | |
|
1096 | s> 8\r\n | |
|
1097 | s> \x00\x00\x00\x01\x00\x02\x002 | |
|
1098 | s> \r\n | |
|
1099 | s> 0\r\n | |
|
1100 | s> \r\n | |
|
1101 | received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) | |
|
1102 | response: gen[ | |
|
1103 | { | |
|
1104 | b'commands': { | |
|
1105 | b'branchmap': { | |
|
1106 | b'args': {}, | |
|
1107 | b'permissions': [ | |
|
1108 | b'pull' | |
|
1109 | ] | |
|
1110 | }, | |
|
1111 | b'capabilities': { | |
|
1112 | b'args': {}, | |
|
1113 | b'permissions': [ | |
|
1114 | b'pull' | |
|
1115 | ] | |
|
1116 | }, | |
|
1117 | b'changesetdata': { | |
|
1118 | b'args': { | |
|
1119 | b'fields': { | |
|
1120 | b'default': set([]), | |
|
1121 | b'required': False, | |
|
1122 | b'type': b'set', | |
|
1123 | b'validvalues': set([ | |
|
1124 | b'bookmarks', | |
|
1125 | b'parents', | |
|
1126 | b'phase', | |
|
1127 | b'revision' | |
|
1128 | ]) | |
|
1129 | }, | |
|
1130 | b'revisions': { | |
|
1131 | b'required': True, | |
|
1132 | b'type': b'list' | |
|
1133 | } | |
|
1134 | }, | |
|
1135 | b'permissions': [ | |
|
1136 | b'pull' | |
|
1137 | ] | |
|
1138 | }, | |
|
1139 | b'filedata': { | |
|
1140 | b'args': { | |
|
1141 | b'fields': { | |
|
1142 | b'default': set([]), | |
|
1143 | b'required': False, | |
|
1144 | b'type': b'set', | |
|
1145 | b'validvalues': set([ | |
|
1146 | b'linknode', | |
|
1147 | b'parents', | |
|
1148 | b'revision' | |
|
1149 | ]) | |
|
1150 | }, | |
|
1151 | b'haveparents': { | |
|
1152 | b'default': False, | |
|
1153 | b'required': False, | |
|
1154 | b'type': b'bool' | |
|
1155 | }, | |
|
1156 | b'nodes': { | |
|
1157 | b'required': True, | |
|
1158 | b'type': b'list' | |
|
1159 | }, | |
|
1160 | b'path': { | |
|
1161 | b'required': True, | |
|
1162 | b'type': b'bytes' | |
|
1163 | } | |
|
1164 | }, | |
|
1165 | b'permissions': [ | |
|
1166 | b'pull' | |
|
1167 | ] | |
|
1168 | }, | |
|
1169 | b'filesdata': { | |
|
1170 | b'args': { | |
|
1171 | b'fields': { | |
|
1172 | b'default': set([]), | |
|
1173 | b'required': False, | |
|
1174 | b'type': b'set', | |
|
1175 | b'validvalues': set([ | |
|
1176 | b'firstchangeset', | |
|
1177 | b'linknode', | |
|
1178 | b'parents', | |
|
1179 | b'revision' | |
|
1180 | ]) | |
|
1181 | }, | |
|
1182 | b'haveparents': { | |
|
1183 | b'default': False, | |
|
1184 | b'required': False, | |
|
1185 | b'type': b'bool' | |
|
1186 | }, | |
|
1187 | b'pathfilter': { | |
|
1188 | b'default': None, | |
|
1189 | b'required': False, | |
|
1190 | b'type': b'dict' | |
|
1191 | }, | |
|
1192 | b'revisions': { | |
|
1193 | b'required': True, | |
|
1194 | b'type': b'list' | |
|
1195 | } | |
|
1196 | }, | |
|
1197 | b'permissions': [ | |
|
1198 | b'pull' | |
|
1199 | ], | |
|
1200 | b'recommendedbatchsize': 50000 | |
|
1201 | }, | |
|
1202 | b'heads': { | |
|
1203 | b'args': { | |
|
1204 | b'publiconly': { | |
|
1205 | b'default': False, | |
|
1206 | b'required': False, | |
|
1207 | b'type': b'bool' | |
|
1208 | } | |
|
1209 | }, | |
|
1210 | b'permissions': [ | |
|
1211 | b'pull' | |
|
1212 | ] | |
|
1213 | }, | |
|
1214 | b'known': { | |
|
1215 | b'args': { | |
|
1216 | b'nodes': { | |
|
1217 | b'default': [], | |
|
1218 | b'required': False, | |
|
1219 | b'type': b'list' | |
|
1220 | } | |
|
1221 | }, | |
|
1222 | b'permissions': [ | |
|
1223 | b'pull' | |
|
1224 | ] | |
|
1225 | }, | |
|
1226 | b'listkeys': { | |
|
1227 | b'args': { | |
|
1228 | b'namespace': { | |
|
1229 | b'required': True, | |
|
1230 | b'type': b'bytes' | |
|
1231 | } | |
|
1232 | }, | |
|
1233 | b'permissions': [ | |
|
1234 | b'pull' | |
|
1235 | ] | |
|
1236 | }, | |
|
1237 | b'lookup': { | |
|
1238 | b'args': { | |
|
1239 | b'key': { | |
|
1240 | b'required': True, | |
|
1241 | b'type': b'bytes' | |
|
1242 | } | |
|
1243 | }, | |
|
1244 | b'permissions': [ | |
|
1245 | b'pull' | |
|
1246 | ] | |
|
1247 | }, | |
|
1248 | b'manifestdata': { | |
|
1249 | b'args': { | |
|
1250 | b'fields': { | |
|
1251 | b'default': set([]), | |
|
1252 | b'required': False, | |
|
1253 | b'type': b'set', | |
|
1254 | b'validvalues': set([ | |
|
1255 | b'parents', | |
|
1256 | b'revision' | |
|
1257 | ]) | |
|
1258 | }, | |
|
1259 | b'haveparents': { | |
|
1260 | b'default': False, | |
|
1261 | b'required': False, | |
|
1262 | b'type': b'bool' | |
|
1263 | }, | |
|
1264 | b'nodes': { | |
|
1265 | b'required': True, | |
|
1266 | b'type': b'list' | |
|
1267 | }, | |
|
1268 | b'tree': { | |
|
1269 | b'required': True, | |
|
1270 | b'type': b'bytes' | |
|
1271 | } | |
|
1272 | }, | |
|
1273 | b'permissions': [ | |
|
1274 | b'pull' | |
|
1275 | ], | |
|
1276 | b'recommendedbatchsize': 100000 | |
|
1277 | }, | |
|
1278 | b'pushkey': { | |
|
1279 | b'args': { | |
|
1280 | b'key': { | |
|
1281 | b'required': True, | |
|
1282 | b'type': b'bytes' | |
|
1283 | }, | |
|
1284 | b'namespace': { | |
|
1285 | b'required': True, | |
|
1286 | b'type': b'bytes' | |
|
1287 | }, | |
|
1288 | b'new': { | |
|
1289 | b'required': True, | |
|
1290 | b'type': b'bytes' | |
|
1291 | }, | |
|
1292 | b'old': { | |
|
1293 | b'required': True, | |
|
1294 | b'type': b'bytes' | |
|
1295 | } | |
|
1296 | }, | |
|
1297 | b'permissions': [ | |
|
1298 | b'push' | |
|
1299 | ] | |
|
1300 | }, | |
|
1301 | b'rawstorefiledata': { | |
|
1302 | b'args': { | |
|
1303 | b'files': { | |
|
1304 | b'required': True, | |
|
1305 | b'type': b'list' | |
|
1306 | }, | |
|
1307 | b'pathfilter': { | |
|
1308 | b'default': None, | |
|
1309 | b'required': False, | |
|
1310 | b'type': b'list' | |
|
1311 | } | |
|
1312 | }, | |
|
1313 | b'permissions': [ | |
|
1314 | b'pull' | |
|
1315 | ] | |
|
1316 | } | |
|
1317 | }, | |
|
1318 | b'framingmediatypes': [ | |
|
1319 | b'application/mercurial-exp-framing-0006' | |
|
1320 | ], | |
|
1321 | b'pathfilterprefixes': set([ | |
|
1322 | b'path:', | |
|
1323 | b'rootfilesin:' | |
|
1324 | ]), | |
|
1325 | b'rawrepoformats': [ | |
|
1326 | b'generaldelta', | |
|
1327 | b'revlogv1' | |
|
1336 | b'revlogv1', | |
|
1337 | b'sparserevlog' | |
|
1328 | 1338 | ], |
|
1329 | 1339 | b'redirect': { |
|
1330 | 1340 | b'hashes': [ |
|
1331 | 1341 | b'sha256', |
|
1332 | 1342 | b'sha1' |
|
1333 | 1343 | ], |
|
1334 | 1344 | b'targets': [ |
|
1335 | 1345 | { |
|
1336 | 1346 | b'name': b'target-bad-tls', |
|
1337 | 1347 | b'protocol': b'https', |
|
1338 | 1348 | b'tlsversions': [ |
|
1339 | 1349 | b'42', |
|
1340 | 1350 | b'39' |
|
1341 | 1351 | ], |
|
1342 | 1352 | b'uris': [ |
|
1343 | 1353 | b'https://example.com/' |
|
1344 | 1354 | ] |
|
1345 | 1355 | } |
|
1346 | 1356 | ] |
|
1347 | 1357 | } |
|
1348 | 1358 | } |
|
1349 | 1359 | ] |
|
1350 | 1360 | (sent 2 HTTP requests and * bytes; received * bytes in responses) (glob) |
|
1351 | 1361 | |
|
1352 | 1362 | Set up the server to issue content redirects to its built-in API server. |
|
1353 | 1363 | |
|
1354 | 1364 | $ cat > redirects.py << EOF |
|
1355 | 1365 | > [ |
|
1356 | 1366 | > { |
|
1357 | 1367 | > b'name': b'local', |
|
1358 | 1368 | > b'protocol': b'http', |
|
1359 | 1369 | > b'uris': [b'http://example.com/'], |
|
1360 | 1370 | > }, |
|
1361 | 1371 | > ] |
|
1362 | 1372 | > EOF |
|
1363 | 1373 | |
|
1364 | 1374 | Request to eventual cache URL should return 404 (validating the cache server works) |
|
1365 | 1375 | |
|
1366 | 1376 | $ sendhttpraw << EOF |
|
1367 | 1377 | > httprequest GET api/simplecache/missingkey |
|
1368 | 1378 | > user-agent: test |
|
1369 | 1379 | > EOF |
|
1370 | 1380 | using raw connection to peer |
|
1371 | 1381 | s> GET /api/simplecache/missingkey HTTP/1.1\r\n |
|
1372 | 1382 | s> Accept-Encoding: identity\r\n |
|
1373 | 1383 | s> user-agent: test\r\n |
|
1374 | 1384 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1375 | 1385 | s> \r\n |
|
1376 | 1386 | s> makefile('rb', None) |
|
1377 | 1387 | s> HTTP/1.1 404 Not Found\r\n |
|
1378 | 1388 | s> Server: testing stub value\r\n |
|
1379 | 1389 | s> Date: $HTTP_DATE$\r\n |
|
1380 | 1390 | s> Content-Type: text/plain\r\n |
|
1381 | 1391 | s> Content-Length: 22\r\n |
|
1382 | 1392 | s> \r\n |
|
1383 | 1393 | s> key not found in cache |
|
1384 | 1394 | |
|
1385 | 1395 | Send a cacheable request |
|
1386 | 1396 | |
|
1387 | 1397 | $ sendhttpv2peer << EOF |
|
1388 | 1398 | > command manifestdata |
|
1389 | 1399 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] |
|
1390 | 1400 | > tree eval:b'' |
|
1391 | 1401 | > fields eval:[b'parents'] |
|
1392 | 1402 | > EOF |
|
1393 | 1403 | creating http peer for wire protocol version 2 |
|
1394 | 1404 | sending manifestdata command |
|
1395 | 1405 | response: gen[ |
|
1396 | 1406 | { |
|
1397 | 1407 | b'totalitems': 1 |
|
1398 | 1408 | }, |
|
1399 | 1409 | { |
|
1400 | 1410 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1401 | 1411 | b'parents': [ |
|
1402 | 1412 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1403 | 1413 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1404 | 1414 | ] |
|
1405 | 1415 | } |
|
1406 | 1416 | ] |
|
1407 | 1417 | |
|
1408 | 1418 | Cached entry should be available on server |
|
1409 | 1419 | |
|
1410 | 1420 | $ sendhttpraw << EOF |
|
1411 | 1421 | > httprequest GET api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c |
|
1412 | 1422 | > user-agent: test |
|
1413 | 1423 | > EOF |
|
1414 | 1424 | using raw connection to peer |
|
1415 | 1425 | s> GET /api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c HTTP/1.1\r\n |
|
1416 | 1426 | s> Accept-Encoding: identity\r\n |
|
1417 | 1427 | s> user-agent: test\r\n |
|
1418 | 1428 | s> host: $LOCALIP:$HGPORT\r\n (glob) |
|
1419 | 1429 | s> \r\n |
|
1420 | 1430 | s> makefile('rb', None) |
|
1421 | 1431 | s> HTTP/1.1 200 OK\r\n |
|
1422 | 1432 | s> Server: testing stub value\r\n |
|
1423 | 1433 | s> Date: $HTTP_DATE$\r\n |
|
1424 | 1434 | s> Content-Type: application/mercurial-cbor\r\n |
|
1425 | 1435 | s> Content-Length: 91\r\n |
|
1426 | 1436 | s> \r\n |
|
1427 | 1437 | s> \xa1Jtotalitems\x01\xa2DnodeT\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&AGparents\x82T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00T\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 |
|
1428 | 1438 | cbor> [ |
|
1429 | 1439 | { |
|
1430 | 1440 | b'totalitems': 1 |
|
1431 | 1441 | }, |
|
1432 | 1442 | { |
|
1433 | 1443 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1434 | 1444 | b'parents': [ |
|
1435 | 1445 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1436 | 1446 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1437 | 1447 | ] |
|
1438 | 1448 | } |
|
1439 | 1449 | ] |
|
1440 | 1450 | |
|
1441 | 1451 | 2nd request should result in content redirect response |
|
1442 | 1452 | |
|
1443 | 1453 | $ sendhttpv2peer << EOF |
|
1444 | 1454 | > command manifestdata |
|
1445 | 1455 | > nodes eval:[b'\x99\x2f\x47\x79\x02\x9a\x3d\xf8\xd0\x66\x6d\x00\xbb\x92\x4f\x69\x63\x4e\x26\x41'] |
|
1446 | 1456 | > tree eval:b'' |
|
1447 | 1457 | > fields eval:[b'parents'] |
|
1448 | 1458 | > EOF |
|
1449 | 1459 | creating http peer for wire protocol version 2 |
|
1450 | 1460 | sending manifestdata command |
|
1451 | 1461 | response: gen[ |
|
1452 | 1462 | { |
|
1453 | 1463 | b'totalitems': 1 |
|
1454 | 1464 | }, |
|
1455 | 1465 | { |
|
1456 | 1466 | b'node': b'\x99/Gy\x02\x9a=\xf8\xd0fm\x00\xbb\x92OicN&A', |
|
1457 | 1467 | b'parents': [ |
|
1458 | 1468 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', |
|
1459 | 1469 | b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' |
|
1460 | 1470 | ] |
|
1461 | 1471 | } |
|
1462 | 1472 | ] |
|
1463 | 1473 | |
|
1464 | 1474 | $ cat error.log |
|
1465 | 1475 | $ killdaemons.py |
|
1466 | 1476 | |
|
1467 | 1477 | $ cat .hg/blackbox.log |
|
1468 | 1478 | *> cacher constructed for manifestdata (glob) |
|
1469 | 1479 | *> cache miss for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1470 | 1480 | *> storing cache entry for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1471 | 1481 | *> cacher constructed for manifestdata (glob) |
|
1472 | 1482 | *> cache hit for 47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
|
1473 | 1483 | *> sending content redirect for 47abb8efa5f01b8964d74917793ad2464db0fa2c to http://*:$HGPORT/api/simplecache/47abb8efa5f01b8964d74917793ad2464db0fa2c (glob) |
General Comments 0
You need to be logged in to leave comments.
Login now