Artifactspublic-v0

curl

master
ply4 git calls349 ms290 KiB1 cachedprotocol v2
430 lines23 KiBRaw
1#***************************************************************************
2# _ _ ____ _
3# Project ___| | | | _ \| |
4# / __| | | | |_) | |
5# | (__| |_| | _ <| |___
6# \___|\___/|_| \_\_____|
7#
8# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
9#
10# This software is licensed as described in the file COPYING, which
11# you should have received as part of this distribution. The terms
12# are also available at https://curl.se/docs/copyright.html.
14# You may opt to use, copy, modify, merge, publish, distribute and/or sell
15# copies of the Software, and permit persons to whom the Software is
16# furnished to do so, under the terms of the COPYING file.
18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19# KIND, either express or implied.
21# SPDX-License-Identifier: curl
23###########################################################################
25import filecmp
26import logging
27import os
28import re
29import sys
31import pytest
32from testenv import CurlClient, Env, ExecResult
34log = logging.getLogger(__name__)
37class TestProxy:
39 @pytest.fixture(autouse=True, scope='class')
40 @classmethod
41 def _class_scope(cls, env, httpd, nghttpx_fwd):
42 push_dir = os.path.join(httpd.docs_dir, 'push')
43 if not os.path.exists(push_dir):
44 os.makedirs(push_dir)
45 if env.have_nghttpx():
46 nghttpx_fwd.start_if_needed()
47 env.make_data_file(indir=env.gen_dir, fname="data-100k", fsize=100 * 1024)
48 env.make_data_file(indir=env.gen_dir, fname="data-10m", fsize=10 * 1024 * 1024)
49 indir = httpd.docs_dir
50 env.make_data_file(indir=indir, fname="data-100k", fsize=100 * 1024)
51 env.make_data_file(indir=indir, fname="data-1m", fsize=1024 * 1024)
53 def get_tunnel_proto_used(self, r: ExecResult):
54 for line in r.trace_lines:
55 m = re.match(r'.* CONNECT: \'(\S+)\' negotiated$', line)
56 if m:
57 return m.group(1)
58 assert False, f'tunnel protocol not found in:\n{"".join(r.trace_lines)}'
60 # download via http: proxy (no tunnel)
61 def test_10_01_proxy_http(self, env: Env, httpd):
62 curl = CurlClient(env=env)
63 url = f'http://localhost:{env.http_port}/data.json'
64 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
65 extra_args=curl.get_proxy_args(proxys=False))
66 r.check_response(count=1, http_status=200)
68 # download via https: proxy (no tunnel)
69 @pytest.mark.skipif(condition=not Env.curl_has_feature('HTTPS-proxy'),
70 reason='curl lacks HTTPS-proxy support')
71 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
72 def test_10_02_proxys_down(self, env: Env, httpd, proto):
73 if proto == 'h2' and not env.curl_uses_lib('nghttp2'):
74 pytest.skip('only supported with nghttp2')
75 curl = CurlClient(env=env)
76 url = f'http://localhost:{env.http_port}/data.json'
77 xargs = curl.get_proxy_args(proto=proto)
78 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
79 extra_args=xargs)
80 r.check_response(count=1, http_status=200,
81 protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1')
83 # upload via https: with proto (no tunnel)
84 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
85 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
86 @pytest.mark.parametrize("fname, fcount, with_alpn", [
87 ['data.json', 5, False],
88 ['data.json', 5, True],
89 ['data-100k', 5, True],
90 ['data-1m', 2, True]
91 ])
92 @pytest.mark.skipif(condition=not Env.have_nghttpx(),
93 reason="no nghttpx available")
94 def test_10_02_proxys_up(self, env: Env, httpd, nghttpx, proto,
95 fname, fcount, with_alpn):
96 if proto == 'h2' and not env.curl_uses_lib('nghttp2'):
97 pytest.skip('only supported with nghttp2')
98 count = fcount
99 srcfile = os.path.join(httpd.docs_dir, fname)
100 curl = CurlClient(env=env)
101 url = f'http://localhost:{env.http_port}/curltest/echo?id=[0-{count-1}]'
102 xargs = curl.get_proxy_args(proto=proto)
103 if not with_alpn:
104 xargs.append('--no-alpn')
105 r = curl.http_upload(urls=[url], data=f'@{srcfile}', alpn_proto=proto,
106 extra_args=xargs)
107 r.check_response(count=count, http_status=200,
108 protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1')
109 with open(srcfile) as fi:
110 indata = fi.readlines()
111 for i in range(count):
112 with open(curl.response_file(i)) as fr:
113 respdata = fr.readlines()
114 assert respdata == indata
116 # download http: via http: proxytunnel
117 def test_10_03_proxytunnel_http(self, env: Env, httpd, nghttpx_fwd):
118 curl = CurlClient(env=env)
119 url = f'http://localhost:{env.http_port}/data.json'
120 xargs = curl.get_proxy_args(proxys=False, tunnel=True)
121 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
122 extra_args=xargs)
123 r.check_response(count=1, http_status=200)
125 # download http: via https: proxytunnel
126 @pytest.mark.skipif(condition=not Env.curl_has_feature('HTTPS-proxy'),
127 reason='curl lacks HTTPS-proxy support')
128 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
129 def test_10_04_proxy_https(self, env: Env, httpd, nghttpx_fwd):
130 curl = CurlClient(env=env)
131 url = f'http://localhost:{env.http_port}/data.json'
132 xargs = curl.get_proxy_args(tunnel=True)
133 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
134 extra_args=xargs)
135 r.check_response(count=1, http_status=200)
137 # download https: with proto via http: proxytunnel
138 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
139 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
140 def test_10_05_proxytunnel_http(self, env: Env, httpd, nghttpx_fwd, proto):
141 curl = CurlClient(env=env)
142 url = f'https://localhost:{env.https_port}/data.json'
143 xargs = curl.get_proxy_args(proxys=False, tunnel=True)
144 r = curl.http_download(urls=[url], alpn_proto=proto, with_stats=True,
145 extra_args=xargs)
146 r.check_response(count=1, http_status=200,
147 protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1')
149 # download https: with proto via https: proxytunnel
150 @pytest.mark.skipif(condition=not Env.curl_has_feature('HTTPS-proxy'),
151 reason='curl lacks HTTPS-proxy support')
152 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
153 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
154 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
155 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
156 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
157 def test_10_06_proxytunnel_https(self, env: Env, httpd, nghttpx_fwd, proto, tunnel):
158 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
159 pytest.skip('only supported with nghttp2')
160 curl = CurlClient(env=env)
161 url = f'https://localhost:{env.https_port}/data.json?[0-0]'
162 xargs = curl.get_proxy_args(tunnel=True, proto=tunnel)
163 r = curl.http_download(urls=[url], alpn_proto=proto, with_stats=True,
164 extra_args=xargs)
165 r.check_response(count=1, http_status=200,
166 protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1')
167 assert self.get_tunnel_proto_used(r) == tunnel
168 srcfile = os.path.join(httpd.docs_dir, 'data.json')
169 dfile = curl.download_file(0)
170 assert filecmp.cmp(srcfile, dfile, shallow=False)
172 # download many https: with proto via https: proxytunnel
173 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
174 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
175 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
176 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
177 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
178 @pytest.mark.parametrize("fname, fcount", [
179 ['data.json', 100],
180 ['data-100k', 20],
181 ['data-1m', 5]
182 ])
183 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
184 def test_10_07_pts_down_small(self, env: Env, httpd, nghttpx_fwd, proto,
185 tunnel, fname, fcount):
186 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
187 pytest.skip('only supported with nghttp2')
188 if env.curl_uses_lib('mbedtls') and \
189 sys.platform.startswith('darwin') and env.ci_run:
190 pytest.skip('mbedtls 3.6.3 fails this test on macOS CI runners')
191 count = fcount
192 curl = CurlClient(env=env)
193 url = f'https://localhost:{env.https_port}/{fname}?[0-{count-1}]'
194 xargs = curl.get_proxy_args(tunnel=True, proto=tunnel)
195 r = curl.http_download(urls=[url], alpn_proto=proto, with_stats=True,
196 extra_args=xargs)
197 r.check_response(count=count, http_status=200,
198 protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1')
199 assert self.get_tunnel_proto_used(r) == tunnel
200 srcfile = os.path.join(httpd.docs_dir, fname)
201 for i in range(count):
202 dfile = curl.download_file(i)
203 assert filecmp.cmp(srcfile, dfile, shallow=False)
204 assert r.total_connects == 1, r.dump_logs()
206 # upload many https: with proto via https: proxytunnel
207 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
208 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
209 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
210 @pytest.mark.parametrize("fname, fcount", [
211 ['data.json', 50],
212 ['data-100k', 20],
213 ['data-1m', 5]
214 ])
215 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
216 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
217 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
218 def test_10_08_upload_seq_large(self, env: Env, httpd, nghttpx, proto,
219 tunnel, fname, fcount):
220 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
221 pytest.skip('only supported with nghttp2')
222 if env.curl_uses_lib('mbedtls') and \
223 sys.platform.startswith('darwin') and env.ci_run:
224 pytest.skip('mbedtls 3.6.3 fails this test on macOS CI runners')
225 count = fcount
226 srcfile = os.path.join(httpd.docs_dir, fname)
227 curl = CurlClient(env=env)
228 url = f'https://localhost:{env.https_port}/curltest/echo?id=[0-{count-1}]'
229 xargs = curl.get_proxy_args(tunnel=True, proto=tunnel)
230 r = curl.http_upload(urls=[url], data=f'@{srcfile}', alpn_proto=proto,
231 extra_args=xargs)
232 assert self.get_tunnel_proto_used(r) == tunnel
233 r.check_response(count=count, http_status=200)
234 assert r.total_connects == 1, r.dump_logs()
235 with open(srcfile) as fi:
236 indata = fi.readlines()
237 for i in range(count):
238 with open(curl.response_file(i)) as fr:
239 respdata = fr.readlines()
240 assert respdata == indata, f'response {i} differs'
242 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
243 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
244 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
245 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
246 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
247 def test_10_09_reuse_server(self, env: Env, httpd, nghttpx_fwd, tunnel):
248 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
249 pytest.skip('only supported with nghttp2')
250 curl = CurlClient(env=env)
251 url1 = f'https://localhost:{env.https_port}/data.json'
252 url2 = f'http://localhost:{env.http_port}/data.json'
253 xargs = curl.get_proxy_args(tunnel=True, proto=tunnel)
254 r = curl.http_download(urls=[url1, url2], alpn_proto='http/1.1', with_stats=True,
255 extra_args=xargs)
256 r.check_response(count=2, http_status=200)
257 assert self.get_tunnel_proto_used(r) == tunnel
258 if tunnel == 'h2':
259 # TODO: we would like to reuse the first connection for the
260 # second URL, but this is currently not possible
261 # assert r.total_connects == 1
262 assert r.total_connects == 2
263 else:
264 assert r.total_connects == 2
266 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
267 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
268 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
269 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
270 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
271 def test_10_10_reuse_proxy(self, env: Env, httpd, nghttpx_fwd, tunnel):
272 # URL twice via https: proxy separated with '--next', will reuse
273 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
274 pytest.skip('only supported with nghttp2')
275 if env.curl_uses_lib('mbedtls') and \
276 sys.platform.startswith('darwin') and env.ci_run:
277 pytest.skip('mbedtls 3.6.3 fails this test on macOS CI runners')
278 curl = CurlClient(env=env)
279 url = f'https://localhost:{env.https_port}/data.json'
280 proxy_args = curl.get_proxy_args(tunnel=True, proto=tunnel)
281 r1 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
282 extra_args=proxy_args)
283 r1.check_response(count=1, http_status=200)
284 assert self.get_tunnel_proto_used(r1) == tunnel
285 # get the args, duplicate separated with '--next'
286 x2_args = r1.args[1:]
287 x2_args.append('--next')
288 x2_args.extend(proxy_args)
289 r2 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
290 extra_args=x2_args)
291 r2.check_response(count=2, http_status=200)
292 assert r2.total_connects == 1
294 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
295 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
296 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
297 @pytest.mark.skipif(condition=not Env.curl_uses_lib('openssl'), reason="tls13-ciphers not supported")
298 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
299 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
300 def test_10_11_noreuse_proxy_https(self, env: Env, httpd, nghttpx_fwd, tunnel):
301 # different --proxy-tls13-ciphers, no reuse of connection for https:
302 curl = CurlClient(env=env)
303 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
304 pytest.skip('only supported with nghttp2')
305 url = f'https://localhost:{env.https_port}/data.json'
306 proxy_args = curl.get_proxy_args(tunnel=True, proto=tunnel)
307 r1 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
308 extra_args=proxy_args)
309 r1.check_response(count=1, http_status=200)
310 assert self.get_tunnel_proto_used(r1) == tunnel
311 # get the args, duplicate separated with '--next'
312 x2_args = r1.args[1:]
313 x2_args.append('--next')
314 x2_args.extend(proxy_args)
315 x2_args.extend(['--proxy-tls13-ciphers', 'TLS_AES_256_GCM_SHA384'])
316 r2 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
317 extra_args=x2_args)
318 r2.check_response(count=2, http_status=200)
319 assert r2.total_connects == 2
321 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
322 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
323 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
324 @pytest.mark.skipif(condition=not Env.curl_uses_lib('openssl'), reason="tls13-ciphers not supported")
325 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
326 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
327 def test_10_12_noreuse_proxy_http(self, env: Env, httpd, nghttpx_fwd, tunnel):
328 # different --proxy-tls13-ciphers, no reuse of connection for http:
329 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
330 pytest.skip('only supported with nghttp2')
331 curl = CurlClient(env=env)
332 url = f'http://localhost:{env.http_port}/data.json'
333 proxy_args = curl.get_proxy_args(tunnel=True, proto=tunnel)
334 r1 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
335 extra_args=proxy_args)
336 r1.check_response(count=1, http_status=200)
337 assert self.get_tunnel_proto_used(r1) == tunnel
338 # get the args, duplicate separated with '--next'
339 x2_args = r1.args[1:]
340 x2_args.append('--next')
341 x2_args.extend(proxy_args)
342 x2_args.extend(['--proxy-tls13-ciphers', 'TLS_AES_256_GCM_SHA384'])
343 r2 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
344 extra_args=x2_args)
345 r2.check_response(count=2, http_status=200)
346 assert r2.total_connects == 2
348 @pytest.mark.skipif(condition=not Env.have_ssl_curl(), reason="curl without SSL")
349 @pytest.mark.parametrize("tunnel", Env.http_h1_h2_protos())
350 @pytest.mark.skipif(condition=not Env.have_nghttpx(), reason="no nghttpx available")
351 @pytest.mark.skipif(condition=not Env.curl_uses_lib('openssl'), reason="tls13-ciphers not supported")
352 @pytest.mark.skipif(condition=not Env.curl_is_debug(), reason="needs curl debug")
353 @pytest.mark.skipif(condition=not Env.curl_is_verbose(), reason="needs curl verbose strings")
354 def test_10_13_noreuse_https(self, env: Env, httpd, nghttpx_fwd, tunnel):
355 # different --tls13-ciphers on https: same proxy config
356 if tunnel == 'h2' and not env.curl_uses_lib('nghttp2'):
357 pytest.skip('only supported with nghttp2')
358 curl = CurlClient(env=env)
359 url = f'https://localhost:{env.https_port}/data.json'
360 proxy_args = curl.get_proxy_args(tunnel=True, proto=tunnel)
361 r1 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
362 extra_args=proxy_args)
363 r1.check_response(count=1, http_status=200)
364 assert self.get_tunnel_proto_used(r1) == tunnel
365 # get the args, duplicate separated with '--next'
366 x2_args = r1.args[1:]
367 x2_args.append('--next')
368 x2_args.extend(proxy_args)
369 x2_args.extend(['--tls13-ciphers', 'TLS_AES_256_GCM_SHA384'])
370 r2 = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
371 extra_args=x2_args)
372 r2.check_response(count=2, http_status=200)
373 assert r2.total_connects == 2
375 # download via https: proxy (no tunnel) using IP address
376 @pytest.mark.skipif(condition=not Env.curl_has_feature('HTTPS-proxy'),
377 reason='curl lacks HTTPS-proxy support')
378 @pytest.mark.parametrize("proto", Env.http_h1_h2_protos())
379 def test_10_14_proxys_ip_addr(self, env: Env, httpd, proto):
380 if proto == 'h2' and not env.curl_uses_lib('nghttp2'):
381 pytest.skip('only supported with nghttp2')
382 curl = CurlClient(env=env)
383 url = f'http://localhost:{env.http_port}/data.json'
384 xargs = curl.get_proxy_args(proto=proto, use_ip=True)
385 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
386 extra_args=xargs)
387 if env.curl_uses_lib('mbedtls') and \
388 not env.curl_lib_version_at_least('mbedtls', '3.5.0'):
389 r.check_exit_code(60) # CURLE_PEER_FAILED_VERIFICATION
390 else:
391 r.check_response(count=1, http_status=200,
392 protocol='HTTP/2' if proto == 'h2' else 'HTTP/1.1')
394 # download via http: IPv4 proxy (no tunnel) using IP address, IPv6 only
395 @pytest.mark.skipif(condition=not Env.curl_has_feature('IPv6'),
396 reason='no IPv6 support')
397 def test_10_15_proxy_ip_addr(self, env: Env, httpd):
398 proto = 'http/1.1'
399 curl = CurlClient(env=env, force_resolv=False)
400 url = f'http://localhost:{env.http_port}/data.json'
401 xargs = curl.get_proxy_args(proto=proto, use_ip=True, proxys=False)
402 xargs.append('-6')
403 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
404 extra_args=xargs)
405 r.check_exit_code(0)
406 r.check_response(count=1, http_status=200, protocol='HTTP/1.1')
408 # download via http: IPv6 proxy (no tunnel) using IP address, IPv4 only
409 @pytest.mark.skipif(condition=not Env.curl_has_feature('IPv6'),
410 reason='no IPv6 support')
411 def test_10_16_proxy_ip_addr(self, env: Env, httpd):
412 proto = 'http/1.1'
413 curl = CurlClient(env=env, force_resolv=False)
414 url = f'http://localhost:{env.http_port}/data.json'
415 xargs = curl.get_proxy_args(proto=proto, use_ipv6=True, proxys=False)
416 xargs.append('-4')
417 r = curl.http_download(urls=[url], alpn_proto='http/1.1', with_stats=True,
418 extra_args=xargs)
419 r.check_exit_code(0)
420 r.check_response(count=1, http_status=200, protocol='HTTP/1.1')
422 # download via http: proxy (no tunnel), check connection reuse
423 def test_10_17_proxy_http(self, env: Env, httpd):
424 curl = CurlClient(env=env)
425 url1 = f'http://localhost:{env.http_port}/data.json'
426 url2 = f'http://127.0.0.1:{env.http_port}/data.json'
427 r = curl.http_download(urls=[url1, url2], alpn_proto='http/1.1', with_stats=True,
428 extra_args=curl.get_proxy_args(proxys=False))
429 r.check_response(count=2, http_status=200)
430 assert r.total_connects == 1, r.dump_logs()
Diagnostics4 git calls · 349 ms
CallStatusSizeTime0349 ms
discover200152 B9 ms
git.upload-pack discover
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=9
git.response.bytes=152
git.server.agent=gitty/1.0
git.server.object_format=sha1
git.server.caps=agent ls-refs fetch object-format
git.server.fetch=shallow filter sideband-all
git.protocol.version=2
git.pkt.frames=8
git.pkt.data=6
git.pkt.flush=2
git.pkt.delim=0
git.pkt.bytes=152
git.pkt.payload.max=34
ls-refs200149 B18 ms
git.upload-pack ls-refs
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=ls-refs
git.upstream.dur_ms=9
git.response.bytes=149
git.response.cache=UPDATING
git.response.duration_ms=9
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=149
git.pkt.payload.max=78
git.ls_refs.count=2
git.ls_refs.head=refs/heads/master
fetchblob:none · deepen 10200287 KiB · hit2 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=2
git.response.bytes=293470
git.response.cache=HIT
git.response.duration_ms=2
git.fetch.filter=blob:none
git.fetch.filter.requested=tree:0
git.fetch.filter.fallback=blob:none
git.fetch.filter.learned=false
git.fetch.wants=31c911efe5652725e930f4d2e60c9060e5f6646d
git.fetch.haves.count=0
git.fetch.deepen=10
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=10
git.pkt.data=8
git.pkt.flush=1
git.pkt.delim=1
git.pkt.bytes=293470
git.pkt.payload.max=65516
git.sideband.band1.bytes=293354
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0
git.pack.objects=87
git.pack.bytes=293354
git.pack.ofs_delta=0
git.pack.ref_delta=1
git.pack.chain.max=1
git.pack.trailer=6a646bcda6740bab42e321b51998b52ea15146c0
git.pack.full=86
Open pack map
fetch2003.5 KiB329 ms
git.upload-pack fetch
http.response.status_code=200
git.upstream.cf_ray=-
git.upstream.phase=fetch
git.upstream.dur_ms=329
git.response.bytes=3587
git.response.cache=MISS
git.response.duration_ms=329
git.fetch.wants=da02cb08f3c6e7ccbe849d14b9a37b6c6a281240
git.fetch.haves.count=0
git.fetch.deepen=0
git.fetch.thin_pack=false
git.fetch.ofs_delta=true
git.protocol.version=2
git.pkt.frames=3
git.pkt.data=2
git.pkt.flush=1
git.pkt.delim=0
git.pkt.bytes=3587
git.pkt.payload.max=3566
git.sideband.band1.bytes=3565
git.sideband.band2.bytes=0
git.sideband.band3.bytes=0

Each row is one HTTP round trip ply made to the git server for this page, on one timeline. discover asks what the server speaks, ls-refs lists branch tips, fetch brings objects by id. A hit was served by Workers Cache. Tap a row for its wire details.

Remote
https://5ad2236b39de4c8bd8f6270ea63f3ea9.artifacts.cloudflare.net/git/public-v0/curl.git
Ref
refs/heads/master
Commit
31c911efe5652725e930f4d2e60c9060e5f6646d
cf-ray
a5e239f2d9d9e9de
Request
d33fea1b…
Protocol
v2 · sha1
Agent
gitty/1.0
Filter
advertised
Fetch
shallow filter sideband-all
Capabilities
agent ls-refs fetch object-format